Forums

[resolved] New database vs. new table in MySQL? (7 posts)

  1. themint100
    Member
    Posted 5 years ago #

    My hosting package gives me only one database (with a default name), so I don't have the option to create a database as described in the installation guide. I can create a new *table* but that asks me for the number of fields and I don't think that's the same. (Forgive me, I'm a mySQL neophyte):

    So my question:

    1) Should I just use that default database (which I'm not using for anything else), using its default name?

    -or-

    2) Should I pony up for an extra database (I'm sure there would be some extra nominal fee)?

    Thanks,

    Greg

  2. Chris_K
    Member
    Posted 5 years ago #

    1) Use the default/only database

    Part of your wp-config.php is the table prefix. You can install multiple WP blogs in the same database as long as each has a different table prefix.

  3. themint100
    Member
    Posted 5 years ago #

    Thanks Handy, I'll give it a whirl.

    -Greg

  4. themint100
    Member
    Posted 5 years ago #

    Hi Handy,

    Thanks for the advice, everything worked well.

    -g

  5. Kiblinger
    Member
    Posted 4 years ago #

    I am in a similar situation, except the default DB I have is already in use, with various tables hosting some website content. I assume letting WordPress create some tables in there too won't be a problem (unless I somehow have tables already using the same names WP wants to use, which seems unlikely).

    So:

    1. Am I right it's OK for WP to share the DB?

    2. Is there a place I can see a list of the names of the tables WP will write (or a document that states it will write tables that are all named something like "wordpress_tablename"), so as to reassure myself that WP won't overwrite anything?

    Backups of course exist but I'd like to have a little more certainty before install...

    Forgive me if I am missing a URL that explains this - haven't found it yet....

  6. Otto
    Tech Ninja
    Posted 4 years ago #

    You can indeed use an existing database. Just change the prefix in the wp-config file to something that won't conflict. All wordpress tables use this prefix. The default is "wp_", so the table names are "wp_posts" and so forth. You can make that prefix anything you like, such as "thisprefixwontconflict_" or whatever.

  7. Kiblinger
    Member
    Posted 4 years ago #

    OH HAI. Duh. It's in the wp-config.php file. All the tables will start with whatever I specify in that file. Thanks anyway!

Topic Closed

This topic has been closed to new replies.

About this Topic