Installed multi db, can't access site

Hi There,
Once again I am trying to instal Multi-Db, on a smaller scale this time!

I have set up 16 db's on a new WP instalation with the main blog and two test blogs. I have followed all the instructions and done the move blog bit and had the results in green saying table in new db. But when I try to visit my site (gracehorses.com) I get this.

Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/grace/public_html/wp-content/db.php on line 656

Warning: Cannot modify header information - headers already sent by (output started at /home/grace/public_html/wp-content/db.php:656) in /home/grace/public_html/wp-includes/functions.php on line 3125

Error establishing a database connection

What could I have done wrong or missed out?
Thanks
Suzanne

  • Mason

    Hiya Ayzola,

    Look for extra white space in your db.php file (at the top or bottom often). Also, have you followed our step-by-step instructional here:
    https://premium.wpmudev.org/project/multi-db/installation/

    Additionally, check your db.php file and make sure you've defined each area as explained in the above instructions, it's possible one has been missed.

    It is one of our most complex plugins setup wise and critical that each step be completed exactly.

  • Ayzola

    This is the line in db.php that is in the error message

    return preg_replace( '/[^0-9.].*/', '', mysql_get_server_info( $this->dbhglobal ) );

    I have followed the instructions and configured db-config.php, but the instructions don't say to do anything with db.php.

    This is my db-config.php with the password removed
    ------------------------------------------------------------------------//
    //---DB Scaling-----------------------------------------------------------//
    //------------------------------------------------------------------------//
    // 16,256,4096
    define ('DB_SCALING', '16');
    //------------------------------------------------------------------------//
    //---DC IPs---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('69.175.77.', 'dc1');
    //------------------------------------------------------------------------//
    //---Global Tables--------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Do not include default global tables
    // Leave off base prefix (eg: wp_)
    //
    // Usage: add_global_table(TABLE_NAME)
    // EX: add_global_table('something');
    add_global_table('grace_wrdp1_global');
    //------------------------------------------------------------------------//
    //---DB Servers-----------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Database servers grouped by dataset.
    // R can be 0 (no reads) or a positive integer indicating the order
    // in which to attempt communication (all locals, then all remotes)
    //
    // Usage: add_db_server(DS, DC, READ, WRITE, HOST, LAN_HOST, NAME, USER, PASS)
    // EX: add_db_server('global', 'dc1', 1, 1,'global.mysql.example.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    //
    // Note: you can also place this section in a file called db-list.php in wp-content
    // EX: add_db_server('global', 'dc1', 1, 1,'global.mysql.example.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    add_db_server('global', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_global', 'grace_wrdp1', ' ');
    add_db_server('0', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_0', 'grace_wrdp1', ' ');
    add_db_server('1', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_1', 'grace_wrdp1', '');
    add_db_server('2', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_2', 'grace_wrdp1', ' ');
    add_db_server('3', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_3', 'grace_wrdp1', ' ');
    add_db_server('4', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_4', 'grace_wrdp1', ' ');
    add_db_server('5', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_5', 'grace_wrdp1', ' ');
    add_db_server('6', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_6', 'grace_wrdp1', ' ');
    add_db_server('7', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_7', 'grace_wrdp1', ' ');
    add_db_server('8', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_8', 'grace_wrdp1', ' ');
    add_db_server('9', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_9', 'grace_wrdp1', ' ');
    add_db_server('a', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_a', 'grace_wrdp1', ' ');
    add_db_server('b', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_b', 'grace_wrdp1', ' ');
    add_db_server('c', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_c', 'grace_wrdp1', ' ');
    add_db_server('d', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_d', 'grace_wrdp1', ' ');
    add_db_server('e', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_e', 'grace_wrdp1', ' ');
    add_db_server('f', 'dc1', 1, 1,'','69.175.77', 'grace_wrdp1_f', 'grace_wrdp1', ' ');

    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_vip_blog(BLOG_ID, DS)
    // EX: add_vip_blog(1, 'vip1');

    ?>
    Can anyone see the problem?
    If I remove db.php I can access my site and create a new site that goes into the original database. If I then rerun move-blogs.php it moves into the new databases. I have tables in dbs a c and e.
    Thanks

  • Ayzola

    Here is some more info that might help. When I go to gracehorses.com/wp-admin I get the following message

    Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/grace/public_html/wp-content/db.php on line 656

    Can’t select database
    We were able to connect to the database server (which means your username and password is okay) but not able to select the grace_wrdp1_global database.

    Are you sure it exists?
    Does the user grace_wrdp1 have permission to use the grace_wrdp1_global database?
    On some systems the name of your database is prefixed with your username, so it would be like username_grace_wrdp1_global. Could that be the problem?
    If you don't know how to set up a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

    The database definatly exists and the user has permission for that database, the name of the database already has the user (grace) in front of it. Hope that helps
    Thanks

  • Ayzola

    Got it! It works.
    It turned out to be the user name. I was using the user name that was created by the creation of the database and I had gone through and given to all the databases, but when I use the user name that I use to login to my cpanel and wordpress admin it works and any new sites are created in the new databases.
    I'm so relieved.
    Thanks for your help
    Suzanne

  • dmanthony

    I am trying to setup my new blog network with multi-db and I seem to be having the same type of problems getting things to work properly. I have tried everything that I can think of that makes sense, but I am obviously missing something little somewhere. Any help getting this up and running will be hugely appreciated.

    I have checked and have no blank lines at the top or the end of any of my files.

    When I try to visit my site http://www.uniquelyreal.com/:

    Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/dmanthony/uniquelyreal.com/wp-content/db.php on line 656
    Error establishing a database connection

    When I visit http://www.uniquelyreal.com/wp-content/scripts/move-blogs.php and perform ?table=copy, I get the following errors:

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 139

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/uniquelyreal/uniquelyreal.com/wp-content/scripts/move-blogs.php on line 140

    My db-config.php looks like:

    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // Author: Andrew Billits (Incsub)
    // Version: 2.9.2
    //------------------------------------------------------------------------//
    //---DB Scaling-----------------------------------------------------------//
    //------------------------------------------------------------------------//
    // 16,256,4096
    define ('DB_SCALING', '256');
    //------------------------------------------------------------------------//
    //---DC IPs---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('mysql.uniquelyreal.com.', 'dc1');
    //------------------------------------------------------------------------//
    //---Global Tables--------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Do not include default global tables
    // Leave off base prefix (eg: wp_)
    //
    // Usage: add_global_table(TABLE_NAME)
    // EX: add_global_table('something');
    add_global_table('uniquelyreal_global');
    add_global_table('affiliatedata');
    add_global_table('affiliatereferrers');
    add_global_table('am_actions');
    add_global_table('am_queue');
    add_global_table('am_schedule');
    add_global_table('autoblog');

    add_global_table('bp_activity');
    add_global_table('bp_activity_meta');
    add_global_table('bp_friends');
    add_global_table('bp_groups');
    add_global_table('bp_groups_groupmeta');
    add_global_table('bp_groups_members');
    add_global_table('bp_messages_messages');
    add_global_table('bp_messages_notices');

    add_global_table('bp_messages_recipients');
    add_global_table('bp_notifications');
    add_global_table('bp_user_blogs');
    add_global_table('bp_user_blogs_blogmeta');
    add_global_table('bp_xprofile_data');
    add_global_table('bp_xprofile_fields');
    add_global_table('bp_xprofile_groups');

    add_global_table('domain_mapping');

    //------------------------------------------------------------------------//
    //---DB Servers-----------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Database servers grouped by dataset.
    // R can be 0 (no reads) or a positive integer indicating the order
    // in which to attempt communication (all locals, then all remotes)
    //
    // Usage: add_db_server(DS, DC, READ, WRITE, HOST, LAN_HOST, NAME, USER, PASS)
    // EX: add_db_server('global', 'dc1', 1, 1,'global.mysql.example.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    //
    // Note: you can also place this section in a file called db-list.php in wp-content
    // EX: add_db_server('global', 'dc1', 1, 1,'global.mysql.example.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    add_db_server('global', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_global', 'database_username', 'database_password');
    add_db_server('00', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_00', 'database_username', 'database_password');
    add_db_server('01', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_01', 'database_username', 'database_password');
    add_db_server('02', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_02', 'database_username', 'database_password');
    add_db_server('03', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_03', 'database_username', 'database_password');
    add_db_server('04', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_04', 'database_username', 'database_password');
    add_db_server('05', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_05', 'database_username', 'database_password');
    add_db_server('06', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_06', 'database_username', 'database_password');
    add_db_server('07', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_07', 'database_username', 'database_password');
    add_db_server('08', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_08', 'database_username', 'database_password');
    add_db_server('09', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_09', 'database_username', 'database_password');
    add_db_server('0a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0a', 'database_username', 'database_password');
    add_db_server('0b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0b', 'database_username', 'database_password');
    add_db_server('0c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0c', 'database_username', 'database_password');
    add_db_server('0d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0d', 'database_username', 'database_password');
    add_db_server('0e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0e', 'database_username', 'database_password');
    add_db_server('0f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_0f', 'database_username', 'database_password');
    add_db_server('10', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_10', 'database_username', 'database_password');
    add_db_server('11', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_11', 'database_username', 'database_password');
    add_db_server('12', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_12', 'database_username', 'database_password');
    add_db_server('13', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_13', 'database_username', 'database_password');
    add_db_server('14', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_14', 'database_username', 'database_password');
    add_db_server('15', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_15', 'database_username', 'database_password');
    add_db_server('16', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_16', 'database_username', 'database_password');
    add_db_server('17', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_17', 'database_username', 'database_password');
    add_db_server('18', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_18', 'database_username', 'database_password');
    add_db_server('19', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_19', 'database_username', 'database_password');
    add_db_server('1a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1a', 'database_username', 'database_password');
    add_db_server('1b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1b', 'database_username', 'database_password');
    add_db_server('1c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1c', 'database_username', 'database_password');
    add_db_server('1d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1d', 'database_username', 'database_password');
    add_db_server('1e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1e', 'database_username', 'database_password');
    add_db_server('1f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_1f', 'database_username', 'database_password');
    add_db_server('20', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_20', 'database_username', 'database_password');
    add_db_server('21', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_21', 'database_username', 'database_password');
    add_db_server('22', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_22', 'database_username', 'database_password');
    add_db_server('23', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_23', 'database_username', 'database_password');
    add_db_server('24', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_24', 'database_username', 'database_password');
    add_db_server('25', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_25', 'database_username', 'database_password');
    add_db_server('26', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_26', 'database_username', 'database_password');
    add_db_server('27', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_27', 'database_username', 'database_password');
    add_db_server('28', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_28', 'database_username', 'database_password');
    add_db_server('29', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_29', 'database_username', 'database_password');
    add_db_server('2a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2a', 'database_username', 'database_password');
    add_db_server('2b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2b', 'database_username', 'database_password');
    add_db_server('2c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2c', 'database_username', 'database_password');
    add_db_server('2d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2d', 'database_username', 'database_password');
    add_db_server('2e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2e', 'database_username', 'database_password');
    add_db_server('2f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_2f', 'database_username', 'database_password');
    add_db_server('30', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_30', 'database_username', 'database_password');
    add_db_server('31', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_31', 'database_username', 'database_password');
    add_db_server('32', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_32', 'database_username', 'database_password');
    add_db_server('33', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_33', 'database_username', 'database_password');
    add_db_server('34', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_34', 'database_username', 'database_password');
    add_db_server('35', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_35', 'database_username', 'database_password');
    add_db_server('36', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_36', 'database_username', 'database_password');
    add_db_server('37', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_37', 'database_username', 'database_password');
    add_db_server('38', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_38', 'database_username', 'database_password');
    add_db_server('39', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_39', 'database_username', 'database_password');
    add_db_server('3a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3a', 'database_username', 'database_password');
    add_db_server('3b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3b', 'database_username', 'database_password');
    add_db_server('3c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3c', 'database_username', 'database_password');
    add_db_server('3d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3d', 'database_username', 'database_password');
    add_db_server('3e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3e', 'database_username', 'database_password');
    add_db_server('3f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_3f', 'database_username', 'database_password');
    add_db_server('40', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_40', 'database_username', 'database_password');
    add_db_server('41', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_41', 'database_username', 'database_password');
    add_db_server('42', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_42', 'database_username', 'database_password');
    add_db_server('43', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_43', 'database_username', 'database_password');
    add_db_server('44', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_44', 'database_username', 'database_password');
    add_db_server('45', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_45', 'database_username', 'database_password');
    add_db_server('46', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_46', 'database_username', 'database_password');
    add_db_server('47', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_47', 'database_username', 'database_password');
    add_db_server('48', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_48', 'database_username', 'database_password');
    add_db_server('49', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_49', 'database_username', 'database_password');
    add_db_server('4a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4a', 'database_username', 'database_password');
    add_db_server('4b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4b', 'database_username', 'database_password');
    add_db_server('4c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4c', 'database_username', 'database_password');
    add_db_server('4d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4d', 'database_username', 'database_password');
    add_db_server('4e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4e', 'database_username', 'database_password');
    add_db_server('4f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_4f', 'database_username', 'database_password');
    add_db_server('50', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_50', 'database_username', 'database_password');
    add_db_server('51', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_51', 'database_username', 'database_password');
    add_db_server('52', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_52', 'database_username', 'database_password');
    add_db_server('53', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_53', 'database_username', 'database_password');
    add_db_server('54', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_54', 'database_username', 'database_password');
    add_db_server('55', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_55', 'database_username', 'database_password');
    add_db_server('56', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_56', 'database_username', 'database_password');
    add_db_server('57', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_57', 'database_username', 'database_password');
    add_db_server('58', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_58', 'database_username', 'database_password');
    add_db_server('59', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_59', 'database_username', 'database_password');
    add_db_server('5a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5a', 'database_username', 'database_password');
    add_db_server('5b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5b', 'database_username', 'database_password');
    add_db_server('5c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5c', 'database_username', 'database_password');
    add_db_server('5d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5d', 'database_username', 'database_password');
    add_db_server('5e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5e', 'database_username', 'database_password');
    add_db_server('5f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_5f', 'database_username', 'database_password');
    add_db_server('60', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_60', 'database_username', 'database_password');
    add_db_server('61', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_61', 'database_username', 'database_password');
    add_db_server('62', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_62', 'database_username', 'database_password');
    add_db_server('63', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_63', 'database_username', 'database_password');
    add_db_server('64', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_64', 'database_username', 'database_password');
    add_db_server('65', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_65', 'database_username', 'database_password');
    add_db_server('66', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_66', 'database_username', 'database_password');
    add_db_server('67', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_67', 'database_username', 'database_password');
    add_db_server('68', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_68', 'database_username', 'database_password');
    add_db_server('69', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_69', 'database_username', 'database_password');
    add_db_server('6a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6a', 'database_username', 'database_password');
    add_db_server('6b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6b', 'database_username', 'database_password');
    add_db_server('6c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6c', 'database_username', 'database_password');
    add_db_server('6d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6d', 'database_username', 'database_password');
    add_db_server('6e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6e', 'database_username', 'database_password');
    add_db_server('6f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_6f', 'database_username', 'database_password');
    add_db_server('70', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_70', 'database_username', 'database_password');
    add_db_server('71', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_71', 'database_username', 'database_password');
    add_db_server('72', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_72', 'database_username', 'database_password');
    add_db_server('73', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_73', 'database_username', 'database_password');
    add_db_server('74', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_74', 'database_username', 'database_password');
    add_db_server('75', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_75', 'database_username', 'database_password');
    add_db_server('76', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_76', 'database_username', 'database_password');
    add_db_server('77', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_77', 'database_username', 'database_password');
    add_db_server('78', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_78', 'database_username', 'database_password');
    add_db_server('79', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_79', 'database_username', 'database_password');
    add_db_server('7a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7a', 'database_username', 'database_password');
    add_db_server('7b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7b', 'database_username', 'database_password');
    add_db_server('7c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7c', 'database_username', 'database_password');
    add_db_server('7d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7d', 'database_username', 'database_password');
    add_db_server('7e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7e', 'database_username', 'database_password');
    add_db_server('7f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_7f', 'database_username', 'database_password');
    add_db_server('80', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_80', 'database_username', 'database_password');
    add_db_server('81', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_81', 'database_username', 'database_password');
    add_db_server('82', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_82', 'database_username', 'database_password');
    add_db_server('83', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_83', 'database_username', 'database_password');
    add_db_server('84', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_84', 'database_username', 'database_password');
    add_db_server('85', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_85', 'database_username', 'database_password');
    add_db_server('86', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_86', 'database_username', 'database_password');
    add_db_server('87', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_87', 'database_username', 'database_password');
    add_db_server('88', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_88', 'database_username', 'database_password');
    add_db_server('89', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_89', 'database_username', 'database_password');
    add_db_server('8a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8a', 'database_username', 'database_password');
    add_db_server('8b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8b', 'database_username', 'database_password');
    add_db_server('8c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8c', 'database_username', 'database_password');
    add_db_server('8d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8d', 'database_username', 'database_password');
    add_db_server('8e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8e', 'database_username', 'database_password');
    add_db_server('8f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_8f', 'database_username', 'database_password');
    add_db_server('90', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_90', 'database_username', 'database_password');
    add_db_server('91', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_91', 'database_username', 'database_password');
    add_db_server('92', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_92', 'database_username', 'database_password');
    add_db_server('93', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_93', 'database_username', 'database_password');
    add_db_server('94', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_94', 'database_username', 'database_password');
    add_db_server('95', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_95', 'database_username', 'database_password');
    add_db_server('96', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_96', 'database_username', 'database_password');
    add_db_server('97', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_97', 'database_username', 'database_password');
    add_db_server('98', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_98', 'database_username', 'database_password');
    add_db_server('99', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_99', 'database_username', 'database_password');
    add_db_server('9a', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9a', 'database_username', 'database_password');
    add_db_server('9b', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9b', 'database_username', 'database_password');
    add_db_server('9c', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9c', 'database_username', 'database_password');
    add_db_server('9d', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9d', 'database_username', 'database_password');
    add_db_server('9e', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9e', 'database_username', 'database_password');
    add_db_server('9f', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_9f', 'database_username', 'database_password');
    add_db_server('a0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a0', 'database_username', 'database_password');
    add_db_server('a1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a1', 'database_username', 'database_password');
    add_db_server('a2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a2', 'database_username', 'database_password');
    add_db_server('a3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a3', 'database_username', 'database_password');
    add_db_server('a4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a4', 'database_username', 'database_password');
    add_db_server('a5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a5', 'database_username', 'database_password');
    add_db_server('a6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a6', 'database_username', 'database_password');
    add_db_server('a7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a7', 'database_username', 'database_password');
    add_db_server('a8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a8', 'database_username', 'database_password');
    add_db_server('a9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_a9', 'database_username', 'database_password');
    add_db_server('aa', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_aa', 'database_username', 'database_password');
    add_db_server('ab', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ab', 'database_username', 'database_password');
    add_db_server('ac', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ac', 'database_username', 'database_password');
    add_db_server('ad', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ad', 'database_username', 'database_password');
    add_db_server('ae', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ae', 'database_username', 'database_password');
    add_db_server('af', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_af', 'database_username', 'database_password');
    add_db_server('b0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b0', 'database_username', 'database_password');
    add_db_server('b1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b1', 'database_username', 'database_password');
    add_db_server('b2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b2', 'database_username', 'database_password');
    add_db_server('b3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b3', 'database_username', 'database_password');
    add_db_server('b4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b4', 'database_username', 'database_password');
    add_db_server('b5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b5', 'database_username', 'database_password');
    add_db_server('b6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b6', 'database_username', 'database_password');
    add_db_server('b7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b7', 'database_username', 'database_password');
    add_db_server('b8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b8', 'database_username', 'database_password');
    add_db_server('b9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_b9', 'database_username', 'database_password');
    add_db_server('ba', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ba', 'database_username', 'database_password');
    add_db_server('bb', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_bb', 'database_username', 'database_password');
    add_db_server('bc', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_bc', 'database_username', 'database_password');
    add_db_server('bd', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_bd', 'database_username', 'database_password');
    add_db_server('be', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_be', 'database_username', 'database_password');
    add_db_server('bf', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_bf', 'database_username', 'database_password');
    add_db_server('c0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c0', 'database_username', 'database_password');
    add_db_server('c1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c1', 'database_username', 'database_password');
    add_db_server('c2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c2', 'database_username', 'database_password');
    add_db_server('c3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c3', 'database_username', 'database_password');
    add_db_server('c4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c4', 'database_username', 'database_password');
    add_db_server('c5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c5', 'database_username', 'database_password');
    add_db_server('c6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c6', 'database_username', 'database_password');
    add_db_server('c7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c7', 'database_username', 'database_password');
    add_db_server('c8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c8', 'database_username', 'database_password');
    add_db_server('c9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_c9', 'database_username', 'database_password');
    add_db_server('ca', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ca', 'database_username', 'database_password');
    add_db_server('cb', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_cb', 'database_username', 'database_password');
    add_db_server('cc', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_cc', 'database_username', 'database_password');
    add_db_server('cd', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_cd', 'database_username', 'database_password');
    add_db_server('ce', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ce', 'database_username', 'database_password');
    add_db_server('cf', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_cf', 'database_username', 'database_password');
    add_db_server('d0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d0', 'database_username', 'database_password');
    add_db_server('d1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d1', 'database_username', 'database_password');
    add_db_server('d2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d2', 'database_username', 'database_password');
    add_db_server('d3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d3', 'database_username', 'database_password');
    add_db_server('d4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d4', 'database_username', 'database_password');
    add_db_server('d5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d5', 'database_username', 'database_password');
    add_db_server('d6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d6', 'database_username', 'database_password');
    add_db_server('d7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d7', 'database_username', 'database_password');
    add_db_server('d8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d8', 'database_username', 'database_password');
    add_db_server('d9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_d9', 'database_username', 'database_password');
    add_db_server('da', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_da', 'database_username', 'database_password');
    add_db_server('db', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_db', 'database_username', 'database_password');
    add_db_server('dc', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_dc', 'database_username', 'database_password');
    add_db_server('dd', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_dd', 'database_username', 'database_password');
    add_db_server('de', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_de', 'database_username', 'database_password');
    add_db_server('df', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_df', 'database_username', 'database_password');
    add_db_server('e0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e0', 'database_username', 'database_password');
    add_db_server('e1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e1', 'database_username', 'database_password');
    add_db_server('e2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e2', 'database_username', 'database_password');
    add_db_server('e3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e3', 'database_username', 'database_password');
    add_db_server('e4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e4', 'database_username', 'database_password');
    add_db_server('e5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e5', 'database_username', 'database_password');
    add_db_server('e6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e6', 'database_username', 'database_password');
    add_db_server('e7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e7', 'database_username', 'database_password');
    add_db_server('e8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e8', 'database_username', 'database_password');
    add_db_server('e9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_e9', 'database_username', 'database_password');
    add_db_server('ea', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ea', 'database_username', 'database_password');
    add_db_server('eb', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_eb', 'database_username', 'database_password');
    add_db_server('ec', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ec', 'database_username', 'database_password');
    add_db_server('ed', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ed', 'database_username', 'database_password');
    add_db_server('ee', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ee', 'database_username', 'database_password');
    add_db_server('ef', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ef', 'database_username', 'database_password');
    add_db_server('f0', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f0', 'database_username', 'database_password');
    add_db_server('f1', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f1', 'database_username', 'database_password');
    add_db_server('f2', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f2', 'database_username', 'database_password');
    add_db_server('f3', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f3', 'database_username', 'database_password');
    add_db_server('f4', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f4', 'database_username', 'database_password');
    add_db_server('f5', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f5', 'database_username', 'database_password');
    add_db_server('f6', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f6', 'database_username', 'database_password');
    add_db_server('f7', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f7', 'database_username', 'database_password');
    add_db_server('f8', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f8', 'database_username', 'database_password');
    add_db_server('f9', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_f9', 'database_username', 'database_password');
    add_db_server('fa', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_fa', 'database_username', 'database_password');
    add_db_server('fb', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_fb', 'database_username', 'database_password');
    add_db_server('fc', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_fc', 'database_username', 'database_password');
    add_db_server('fd', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_fd', 'database_username', 'database_password');
    add_db_server('fe', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_fe', 'database_username', 'database_password');
    add_db_server('ff', 'dc1', 1, 1,'','mysql.uniquelyreal.com', 'uniquelyreal_ff', 'database_username', 'database_password');

    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_vip_blog(BLOG_ID, DS)
    // EX: add_vip_blog(1, 'vip1');

    ?>

    My scripts/move-blogs.php looks like:

    <?php
    /*
    Plugin Name: Multi-DB (Conversion Tool)
    Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    Description:
    Author: Ron Dillehay - FanMail to rdillehay@hotmail.com (no tech support please) - Modified slightly by Andrew Billits (Incsub)
    Version: 2.9.2
    Author URI:
    Descriptiom:
    This script is to move blogs from a wordpress mu single database setup, to a wordpress mu multiple database setup using an MD5 hash to establish blog routing
    Use this script at your own risk. My test setup uses php 5, mysql 5, and wordpress mu 1.2.5a
    */

    //------------------------------------------------------------------------//
    //---Config---------------------------------------------------------------//
    //------------------------------------------------------------------------//

    ///DB Settings
    $dbname = "uniquelyreal"; //This is your current database
    $blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
    $newdb_prefix = 'uniquelyreal_'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble

    //We need info to connect to the databases
    $dbhost = 'mysql.uniquelyreal.com';
    $dbuname = 'database_username';
    $dbpass = 'database_password';

    //How many db's are you moving into (16, 256, or 4096)?
    $db_scaling = '256';

    //------------------------------------------------------------------------//
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>

    <title>Multiple Databases Conversion Tool</title>
    <head>
    <style type="text/css">
    table.stats
    {text-align: center; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ; font-weight: normal;font-size: 12px;color: #fff;width: 750px;background-color: #666;border: 1px solid #555;border-collapse: collapse;border-spacing: 1px;}
    table.stats td
    {background-color: #CCC;color: #000;padding: 6px;text-align: left;border: 1px #fff solid;}
    table.stats td.head
    {background-color: #666;color: #fff;padding: 6px;text-align: center;border-bottom: 2px #fff solid;font-size: 12px;font-weight: bold;}
    </style>
    </head>

    <?php

    if ($db_scaling == '16'){
    $newdbsize = '1';
    } else if ($db_scaling == '256'){
    $newdbsize = '2';
    } else if ($db_scaling == '4096'){
    $newdbsize = '3';
    }

    //Check to see if we are moving tables yet
    $tabletomove = $_REQUEST["table"];

    //Connect to SQL
    if (!mysql_connect($dbhost, $dbuname, $dbpass)) {
    echo 'Could not connect to mysql';
    exit;
    }

    //Get our table list from the original db
    $sql = "SHOW TABLES FROM $dbname";
    $result = mysql_query($sql);

    if (!$result) {
    echo "DB Error, could not list tables <b>Make sure you configure your original table in the dbname variable at the top of the script!</b>\n";
    echo 'MySQL Error: ' . mysql_error();
    exit;
    }

    echo "<table align='center' class='stats'><tr><td colspan='4' align='center'>

    1. Tested on PHP 5 & MySQL 5
    2. Make sure all of your new db's exist (green text next to table name in db column below)
    3. In the status section, each table should show <i>not in new db (unless you've already run this script)</i>
    4. To start the copy process click here
    5. Be patient, depending on how many blogs you have, this could take a while
    6. Once completed, refresh this page by clicking here
    7. Check to make sure that in the status section all tables say <i>table in new db</i>
    8. Rejoice, I probably just saved you hours of your life!
    9. If this didn't work, don't blame me. Sometimes life is just like that..

    </td></tr><tr><td class='head' width='25%'>table name</td><td class='head' width='25%'>table info</td><td class='head' width='25%'>new db</td><td class='head' width='25%'>status</td></tr>";

    while ($row = mysql_fetch_row($result)) {

    //Here we find our blog id, hash it, and establish our new db names
    $blogid_get = explode("_", $row[0]);
    $blogid = $blogid_get[1];
    $md5_hash = md5($blogid);
    $md5_dbprefix = substr($md5_hash, 0, $newdbsize);
    $this_blog_new_db = $newdb_prefix.$md5_dbprefix;
    if ( !is_numeric($blogid) ) {
    // this is a global table
    $this_blog_new_db = $newdb_prefix."global";
    }
    /*
    if ( $blogid == 1 ) {
    $this_blog_new_db = $newdb_prefix."_home";
    } elseif ( !is_numeric($blogid) ) {
    // this is a global table
    $this_blog_new_db = $newdb_prefix."_global";
    }
    */
    $db = mysql_connect($dbhost, $dbuname, $dbpass) or die("Houston, we have a problem! Database Error: ".mysql_error());
    mysql_select_db($this_blog_new_db, $db) or die("Houston, we have a problem! <b> Looks like you need to create your new db's! If you're lucky, this link still works - click me </b>Database Error: ".mysql_error());
    if( mysql_num_rows( mysql_query("SHOW TABLES LIKE '".$row[0]."'"))) { $tabletest = "<font color='green'>table in new db</font>"; } else { $tabletest = "table not in new db"; }

    //Filter out the nonblog tables
    if ( is_numeric($blogid) ) {
    //Next we check to see if we are actually moving anything yet
    if ($tabletomove != "") {
    //This is where the heavy lifting is done - amazing only four lines of code can save so much time! Tested on php 5 - mysql 5
    $sql_table = "CREATE TABLE $row[0] LIKE $dbname.$row[0]";
    $insert_info = "INSERT INTO $row[0] SELECT * FROM $dbname.$row[0]";
    mysql_query($sql_table);
    mysql_query($insert_info);
    mysql_free_result($sql_table);
    mysql_free_result($insert_info);
    }

    //Close the db and report db status
    mysql_close($db); $testpass = "<font color='green'> exists</font>";
    echo "<tr><td>{$row[0]}</td><td>blog {$blogid}</td><td>{$this_blog_new_db} <i>{$testpass}</i></td><td>{$tabletest}</td></tr>";
    } else {
    // this is a global db.
    //Next we check to see if we are actually moving anything yet
    if ($tabletomove != "") {
    //This is where the heavy lifting is done - amazing only four lines of code can save so much time! Tested on php 5 - mysql 5
    $sql_table = "CREATE TABLE $row[0] LIKE $dbname.$row[0]";
    $insert_info = "INSERT INTO $row[0] SELECT * FROM $dbname.$row[0]";
    mysql_query($sql_table);
    mysql_query($insert_info);
    mysql_free_result($sql_table);
    mysql_free_result($insert_info);
    }
    //Close the db and report db status
    mysql_close($db); $testpass = "<font color='green'> exists</font>";
    echo "<tr><td>{$row[0]}</td><td>blog {$blogid}</td><td>{$this_blog_new_db} <i>{$testpass}</i></td><td>{$tabletest}</td></tr>";
    }
    } // end while

    echo "</table>";

    //Clean up after ourselves
    echo "<center>Ignore any errors below this line</center>";
    echo "<center>================================================================================</center>";

    ?>

  • Barry

    I have changed all the mysql.uniquelyreal.com to 75.119.196.74

    The top one, add_dc_ip should only be the first three parts though, can you make sure you've got that one set correctly?

    The rest you could have left with the domain name, though you do need to put the same in both the host and local parameters. What settings have you got in wp-config.pho? Did the connection work with a single db install prior to setting up the multi-db set up?

  • dmanthony

    The site works fine without the multi-db installed.

    wp-config.php:

    <?php

    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    define('WP_CACHE', true); //Added by WP-Cache Manager
    
    /** The name of the database for WordPress */
    define('DB_NAME', 'uniquelyreal');
    
    /** MySQL database username */
    define('DB_USER', 'database_username');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'database_password');
    
    /** MySQL hostname */
    define('DB_HOST', 'mysql.uniquelyreal.com');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    /**#@+
     * Authentication Unique Keys and Salts.
     *
     * Change these to different unique phrases!
     * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
     * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
     *
     * @since 2.6.0
     */
    define('AUTH_KEY',         'put your unique phrase here');
    define('SECURE_AUTH_KEY',  'put your unique phrase here');
    define('LOGGED_IN_KEY',    'put your unique phrase here');
    define('NONCE_KEY',        'put your unique phrase here');
    define('AUTH_SALT',        'put your unique phrase here');
    define('SECURE_AUTH_SALT', 'put your unique phrase here');
    define('LOGGED_IN_SALT',   'put your unique phrase here');
    define('NONCE_SALT',       'put your unique phrase here');
    
    /**#@-*/
    
    /**
     * WordPress Database Table prefix.
     *
     * You can have multiple installations in one database if you give each a unique
     * prefix. Only numbers, letters, and underscores please!
     */
    $table_prefix  = 'wp_';
    
    /**
     * WordPress Localized Language, defaults to English.
     *
     * Change this to localize WordPress.  A corresponding MO file for the chosen
     * language must be installed to wp-content/languages. For example, install
     * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
     * language support.
     */
    define ('WPLANG', '');
    
    /**
     * For developers: WordPress debugging mode.
     *
     * Change this to true to enable the display of notices during development.
     * It is strongly recommended that plugin and theme developers use WP_DEBUG
     * in their development environments.
     */
    define('WP_DEBUG', false);
    
    /** Activate multisite network  */
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'www.uniquelyreal.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    
    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    	define('ABSPATH', dirname(__FILE__) . '/');
    
    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');