The MU forums have moved to WordPress.org

Use an external Database! (11 posts)

  1. AsHDaMaster
    Member
    Posted 16 years ago #

    Hello,

    Can anybody tell me if I can use the WordPress MU with an external MySQL DB?!
    If yes, can you please tell me how i should configure the DB config file to point to an example DB?

  2. andrewbillits
    Member
    Posted 16 years ago #

    If you mean a database on another host then just change "host" bit of the db config from "localhost" to the IP of the remote host.

  3. demonicume
    Member
    Posted 16 years ago #

    doesnt that affect performance? wouldnt it beasier to install mu local to the DB and admin it remotely?

  4. andrewbillits
    Member
    Posted 16 years ago #

    It depends actually. If you only have a few thousand blogs then it's best to have the db on the same server. However, if you have 40K+ then you really need to have the database(s) on a separate machine.

  5. AsHDaMaster
    Member
    Posted 16 years ago #

    Thank you for your help andrewbillits, that is what i was asking for, to host the DB in another host.

    I was wondering if you could give me a sample of the config file in the following lines. I would appreciate that a lot and i am thanking you in advance :)

    define('DB_HOST', 'localhost');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    define('VHOST', 'VHOSTSETTING');
    $base = 'BASE';

  6. SteveAtty
    Member
    Posted 16 years ago #

    You need to configure the remote DB host to accept logons from a non-local user.

    Then you change the db_host to the hostname of the machine hosting the DB.

  7. Farms
    Member
    Posted 16 years ago #

    like this:

    define('DB_HOST', '100.100.100.100');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');
    define('VHOST', 'VHOSTSETTING');
    $base = 'BASE';

  8. AsHDaMaster
    Member
    Posted 16 years ago #

    thank you all for your helpful replies.

  9. AsHDaMaster
    Member
    Posted 16 years ago #

    srry, one more question. should i also include the port number in the ip?!

  10. SteveAtty
    Member
    Posted 16 years ago #

    You shouldn't - assuming you are using the default port.

  11. AsHDaMaster
    Member
    Posted 16 years ago #

    thanks a lot SteveAtty, you have been rly helpful.

About this Topic

  • Started 16 years ago by AsHDaMaster
  • Latest reply from AsHDaMaster