Forums

Do you need a seperate MySQL database for each installation? (12 posts)

  1. djbell
    Member
    Posted 3 months ago #

    Hi all,

    (wordpress neophite alert)

    I have wordpress up and running. But now I want to create a different blog (my wedding blog) as a subdomain of my personal blog (http://wedblog.personalblog.net). I assume I should do a seperate installation of wordpress. I've ruled out just making it a seperate section of my own blog.

    Should I create a seperate MySQL database for this new wedding blog? My hosting service allows up to 10.

    Thanks!

  2. mrmist
    Member
    Posted 3 months ago #

    You can either use a different database, or you can use the same database by changing wp-config.php for your second blog, so that the line

    $table_prefix = 'wp_'

    has some other prefix. This will seperate your two blogs.

  3. whooami
    Member
    Posted 3 months ago #

    this thread needs some correction.

    or you can use the same database by changing wp-config.php for your second blog, so that the line

    thats not accurate.

    the prefix wordpress uses, in the default case: wp_ is used to identify the tables, not the database.

    wordpress uses a series of tables inside a database, uniquely identifiable by that prefix.

    Yes, you can have multiple wordpress installs inside one database. Those seperate installs would all use different prefixes.

  4. figaro
    Member
    Posted 3 months ago #

    thats not accurate.

    That is accurate and it's the same thing you said.

    @djbell...see the following video for step-by-step directions.

    http://educhalk.org/blog/?p=34

  5. whooami
    Member
    Posted 3 months ago #

    That is accurate and it's the same thing you said.

    no its not. and that isnt what I said.

    wp_comments identifies a table. NOT a database.

    the prefix is attached to tables, not to databases.

    changing the prefix doesnt use a different database.

    --

    mrmist knows this -- its just a misspeak. Im making sure that people that come along and read this after the fact understand that.

  6. nazcar
    Member
    Posted 3 months ago #

    or you can use the same database by changing wp-config.php for your second blog, so that the line

    its correct. same database with different wp table prefix.

  7. djbell
    Member
    Posted 3 months ago #

    OK, but is there some advantage to using the same database? Or would it be easier or more difficult to administer if there were two?

  8. kichu
    Member
    Posted 3 months ago #

    Though both mean the same thing in effect, Whooami tries to amplify the point by laying stress that the prefix is attached to the table names so that they function as different instances of WordPress in the same database.

    Perhaps this is an exercise focusing on newbies so that they get a hang on the semantics and their subtleties!

    S.K

  9. kichu
    Member
    Posted 3 months ago #

    djbell,

    Yes. Two different databases will facilitate administration, if you plan to soil your hand with the database often.

    For a typical "front-ender", it'll make no difference - function-wise.

    S.K

  10. Gangleri
    Member
    Posted 3 months ago #

    DJ, you won't notice the difference of working with one or two databases until something goes wrong. The database crashes, two websites down, one site gets hacked, two sites infected (which risk is equally big with two databases on the same server btw.). It's a breeze to set up a database, WP handles the tables for you anyway, so the only work you spare is the create database part.

    The choice is yours.

    Of course, when you decide to go for the one database option (because you want just one thing to backup for example), change the table prefix in the wp-config file before you install, otherwise you will just have two WP blogs with the same content.

  11. whooami
    Member
    Posted 3 months ago #

    I misread mrmist, he said what I said. :0 I swear I need glasses.

    To clarify,

    You can either use a different database, or you can use the same database by changing wp-config.php for your second blog, so that the line

    $table_prefix = 'wp_'

    has some other prefix. This will seperate your two blogs.

    is spot on.

    djbell, it makes no difference, really.

  12. figaro
    Member
    Posted 3 months ago #

    OK, but is there some advantage to using the same database? Or would it be easier or more difficult to administer if there were two?

    Some people use a single db because their host limits the number of db's they can create.

    There are pros and cons to each approach, but if you can create an additional db, then I would recommend doing so...just keeps things a bit cleaner.

Reply

You must log in to post.

About this Topic

Tags