Can someone explain this install to me please..

Some basic information first

Database name: moorg_
Database Wordpress is installed in: moorg_Wp786
Database username: moorg_yaseen
Database pwd: pa55word
Server IP: 74.55.156.66

Details from wp-config as follows:

define('DB_NAME', 'moorg_Wp786');

/** MySQL database username */
define('DB_USER', 'moorg_yaseen');

/** MySQL database password */
define('DB_PASSWORD', 'pa55word');

/** MySQL hostname */
define('DB_HOST', 'localhost');

The following databases were created and user moorg_yaseen added to them:

CREATE DATABASE moorg_0 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Databases moorg_0 through to moorg_f where created
Also the following was created:

CREATE DATABASE moorg_global DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

First I will address db-config.php what i have entered into here is as follows:

Line 10 : define ('DB_SCALING', '16);
Line 16: add_dc_ip('74.55.156.', 'dcl');
Line 25: add_global_table('moorg_global');

DB server information was added as follows:

add_db_server('global', 'dc1', 1, 1,'74.56.156.66','127.0.0.1', 'moorg_global', 'moorg_yaseen',  'pa55word');

add_db_server('0', 'dc1', 1, 1,'74.56.156.66','127.0.0.1', 'moorg_0', 'moorg_yaseen',  'pa55word');

This was done for all databases save pasting it all in here.

Now to move-blog.php

Line 19: $dbname = "moorg_Wp786";
Line 20: $blog_table_prefix = 'wp_';
Line 21: $newdb_prefix = 'moorg';

Line 24: $dbhost = 'localhost';
Line 25: $dbuname = 'moorg_yaseen';
Line 26: $dbpass = 'pa55word';

Line 29: $db_scaling = '16';

The files were FTP'd to the respective locations on the server.

I cannot for the life of me work out whats going wrong.

Any advise appreciated.

  • Larry_D

    Also <db-config.php> added db servers lines are incorrect. Where did you get the 127.0.0.1? If from instructions that is incorrect.

    OLD:
    add_db_server('0', 'dc1', 1, 1,'74.56.156.66','127.0.0.1', 'moorg_0', 'moorg_yaseen', 'pa55word');

    It should look like this:
    add_db_server('0', 'dc1', 1, 1,'','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');

    This is how I set my DB's up. I tried putting the IP in both locations but it would not activate until I removed it from the first place. Make sure you keep the 'tick' marks.

    Good luck!

  • look4

    fixed line 21 of move-blog from moorg to moorg_

    It should look like this:
    add_db_server('0', 'dc1', 1, 1,'','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');

    I have now done this and also the same for the global

    It should look like this:
    add_db_server('global', 'dc1', 1, 1,'','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');

    Gives error that breaks the whole site database connection

  • Barry

    Line 25: add_global_table('moorg_global');

    That line is wrong unless you have a table called wp_moorg_global in your global database.

    add_db_server('global'

    I notice in your steps above the db-config information you posted that you didn't mention creating a _global database? Have you done that?

    Where did you get the 127.0.0.1? If from instructions that is incorrect.

    127.0.0.1 is the IP address of the localhost loop (i.e. the same server), so if you database is on the same server as your webserver, 127.0.0.1 will always point to it locally.

    It should look like this:
    add_db_server('0', 'dc1', 1, 1,'','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');

    You need an IP address in the '' part, if you don't have separate local and wan IP addresses, then put the same one in both.

  • look4

    Line 25 i took from the instructions stating :

    CREATE DATABASE dbname_global DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    there is a screenshot of the mysql database tables i know these tables are only for a 16 scale model but im assuming if i work out how to do this with 16 then i can do it with any number

    I will make the changes as suggested and put my IP address for the server in both parts and report back

    I have made the change to line 25 back to what it used to be i think i read the instructions in correct there then.

  • look4

    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // Author: Andrew Billits (Incsub), S H Mohanjith (Incsub)
    // Version: 2.9.2
    //------------------------------------------------------------------------//
    //---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('74.55.156.', 'dcl');
    //------------------------------------------------------------------------//
    //---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('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,'74.56.156.66','74.56.156.66', 'moorg_global', 'moorg_yaseen', 'pa55word');

    add_db_server('0', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');
    add_db_server('1', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_1', 'moorg_yaseen', 'pa55word');
    add_db_server('2', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_2', 'moorg_yaseen', 'pa55word');
    add_db_server('3', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_3', 'moorg_yaseen', 'pa55word');
    add_db_server('4', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_4', 'moorg_yaseen', 'pa55word');
    add_db_server('5', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_5', 'moorg_yaseen', 'pa55word');
    add_db_server('6', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_6', 'moorg_yaseen', 'pa55word');
    add_db_server('7', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_7', 'moorg_yaseen', 'pa55word');
    add_db_server('8', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_8', 'moorg_yaseen', 'pa55word');
    add_db_server('9', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_9', 'moorg_yaseen', 'pa55word');
    add_db_server('a', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_a', 'moorg_yaseen', 'pa55word');
    add_db_server('b', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_b', 'moorg_yaseen', 'pa55word');
    add_db_server('c', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_c', 'moorg_yaseen', 'pa55word');
    add_db_server('d', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_d', 'moorg_yaseen', 'pa55word');
    add_db_server('e', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_e', 'moorg_yaseen', 'pa55word');
    add_db_server('f', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_f', 'moorg_yaseen', 'pa55word');

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

    ?>

  • look4

    I ftp the files to the following

    /scripts/move-blogs.php

    /wp-content/db.php
    /wp-content/dp-config.php

    uploading them actually breaks the site

    my move-blogs.php looks like this

    $dbname = "moorg_Wp786"; //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 = 'moorg_'; //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 = 'localhost';
    $dbuname = 'moorg_yaseen';
    $dbpass = 'pa55word';

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

  • look4

    error message is as follows :

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

    Warning: Cannot modify header information - headers already sent by (output started at /home/moorg/public_html/wp-content/db.php:669) in /home/moorg/public_html/wp-includes/functions.php on line 3191
    Error establishing a database connection

  • becky

    Just to add, I got warnings when i install multi db. But if after you have completed the move-blog steps and the page says that all the tables have been created and moved, it should be ok. Go to PHPMyAdmin to check the number of tables created are correct i.e in total, you should have the same number of tables.

    Clear your error log in your root install and check in the next day or so to see if there is anymore errors.

  • look4

    Just as above with the changes pasted below following what barry had said.

    did you manage to get it working yet larry? I have to say this it would be better if they had a ticket system i think rather than rely on hoping someone sees your forum post and answers its too slow to get answers that way imho you subscription runs about before you actually get anything worthwhile done :slight_frown:

  • Larry_D

    Based on what I see above and what I needed to do to successfully active the multiDB plugin this is what I would recommend you try.

    db-config.php
    Line#10: define ('DB_SCALING', '16'); CORRECT
    Line#16: EX: add_dc_ip('123.123.123.', 'dc1'); CORRECT
    Line#25: Leave alone (as is), do not follow the instruction at all cost. :^)

    Line#63: add_db_server('global', 'dc1', 1, 1,'localhost6','localhost', 'moorg_global', 'moorg_yaseen', 'pa55word');
    Line#65: add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'moorg_0', 'moorg_yaseen', 'pa55word');
    Line#66: add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'moorg_1', 'moorg_yaseen', 'pa55word');
    Continue the pattern through line #80

    Unless you have VIP databases you are done.

    move-blogs.php
    looks fine

    Have you changes the root database in the wp-config.php, I had to change it to my globalDB. Change this moorg_Wp786 to moorg_global

    define('DB_NAME', 'moorg_global');

    You will still need to run the move script as the instructions suggest. I received several errors at this point, all above the menu window. Scroll back to the window and see if you now have a green status if not click on step #4 of that menu again. If they all go green proceed.

    I hope this helps, if not post your current configurations.

  • look4

    move-blog.php

    ///DB Settings
    $dbname = "moorg_Wp786"; //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 = 'moorg_'; //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 = 'localhost';
    $dbuname = 'moorg_yaseen';
    $dbpass = 'pa55word';

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

  • look4

    db-config.php

    define ('DB_SCALING', '16');
    //------------------------------------------------------------------------//
    //---DC IPs---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('74.55.156.', '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('moorg_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,'74.56.156.66','74.56.156.66', 'moorg_global', 'moorg_yaseen', 'pa55word');

    add_db_server('0', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');
    add_db_server('1', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_1', 'moorg_yaseen', 'pa55word');
    add_db_server('2', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_2', 'moorg_yaseen', 'pa55word');
    add_db_server('3', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_3', 'moorg_yaseen', 'pa55word');
    add_db_server('4', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_4', 'moorg_yaseen', 'pa55word');
    add_db_server('5', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_5', 'moorg_yaseen', 'pa55word');
    add_db_server('6', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_6', 'moorg_yaseen', 'pa55word');
    add_db_server('7', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_7', 'moorg_yaseen', 'pa55word');
    add_db_server('8', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_8', 'moorg_yaseen', 'pa55word');
    add_db_server('9', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_9', 'moorg_yaseen', 'pa55word');
    add_db_server('a', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_a', 'moorg_yaseen', 'pa55word');
    add_db_server('b', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_b', 'moorg_yaseen', 'pa55word');
    add_db_server('c', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_c', 'moorg_yaseen', 'pa55word');
    add_db_server('d', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_d', 'moorg_yaseen', 'pa55word');
    add_db_server('e', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_e', 'moorg_yaseen', 'pa55word');
    add_db_server('f', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_f', 'moorg_yaseen', 'pa55word');

  • look4

    wp-config.php

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'moorg_Wp786');

    /** MySQL database username */
    define('DB_USER', 'moorg_yaseen');

    /** MySQL database password */
    define('DB_PASSWORD', 'pa55word');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** 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', '');

  • Larry_D

    db-config.php

    add_global_table('moorg_global');

    Return this to original setting. So not follow the instructions.

    add_db_server('global', 'dc1', 1, 1,'74.56.156.66','74.56.156.66', 'moorg_global', 'moorg_yaseen', 'pa55word');

    I change the IP to localhost and ALL the add_db_server lines, so it looked like this.
    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'moorg_global', 'moorg_yaseen', 'pa55word');

    wp-config.php

    define('DB_NAME', 'moorg_Wp786');

    I had to change the database name to point at my global database.
    define('DB_NAME', 'moorg_global');

    I will continue looking, but do these changes for now.

  • Larry_D

    If you have not done so, modify your wp-config.php.

    Your current wp-config.php
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'moorg_Wp786'); change to moorg_global

    /** MySQL database username */
    define('DB_USER', 'moorg_yaseen');

    /** MySQL database password */
    define('DB_PASSWORD', 'pa55word');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** 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', '');

  • Larry_D

    Look4, I just finishing setting up a multidb site with your settings. Review the setting below.

    db-config.php
    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // Author: Andrew Billits (Incsub), S H Mohanjith (Incsub)
    // Version: 2.9.2
    //------------------------------------------------------------------------//
    //---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('173.247.249.', 'dc1'); You will need to change this setting to yours.
    //------------------------------------------------------------------------//
    //---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('affiliatedata'); Do not modify as instructions imply
    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,'localhost','localhost', 'moorg_global', 'moorg_yaseen', 'pa55word');

    add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'moorg_0', 'moorg_yaseen', 'pa55word');
    add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'moorg_1', 'moorg_yaseen', 'pa55word');
    add_db_server('2', 'dc1', 1, 1,'localhost','localhost', 'moorg_2', 'moorg_yaseen', 'pa55word');
    add_db_server('3', 'dc1', 1, 1,'localhost','localhost', 'moorg_3', 'moorg_yaseen', 'pa55word');
    add_db_server('4', 'dc1', 1, 1,'localhost','localhost', 'moorg_4', 'moorg_yaseen', 'pa55word');
    add_db_server('5', 'dc1', 1, 1,'localhost','localhost', 'moorg_5', 'moorg_yaseen', 'pa55word');
    add_db_server('6', 'dc1', 1, 1,'localhost','localhost', 'moorg_6', 'moorg_yaseen', 'pa55word');
    add_db_server('7', 'dc1', 1, 1,'localhost','localhost', 'moorg_7', 'moorg_yaseen', 'pa55word');
    add_db_server('8', 'dc1', 1, 1,'localhost','localhost', 'moorg_8', 'moorg_yaseen', 'pa55word');
    add_db_server('9', 'dc1', 1, 1,'localhost','localhost', 'moorg_9', 'moorg_yaseen', 'pa55word');
    add_db_server('a', 'dc1', 1, 1,'localhost','localhost', 'moorg_a', 'moorg_yaseen', 'pa55word');
    add_db_server('b', 'dc1', 1, 1,'localhost','localhost', 'moorg_b', 'moorg_yaseen', 'pa55word');
    add_db_server('c', 'dc1', 1, 1,'localhost','localhost', 'moorg_c', 'moorg_yaseen', 'pa55word');
    add_db_server('d', 'dc1', 1, 1,'localhost','localhost', 'moorg_d', 'moorg_yaseen', 'pa55word');
    add_db_server('e', 'dc1', 1, 1,'localhost','localhost', 'moorg_e', 'moorg_yaseen', 'pa55word');
    add_db_server('f', 'dc1', 1, 1,'localhost','localhost', 'moorg_f', 'moorg_yaseen', 'pa55word');

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

    ?>

    Double check to see what you have your global named as, I was making the mistake of adding wpglobal when the name I created was really global. Copying the instructions is wrong unless you actually named your global DB that.

    Also note that you depending on the temperment of your server you may need to replace localhost above with your full IP address. So the lines would then show your IP twice instead of locahost twice.

    move-blog.php
    <?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 = "moorg_Wp786"; //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 = 'moorg_'; //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 = 'localhost';
    $dbuname = 'moorg_yaseen';
    $dbpass = 'pa55word';

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

    //------------------------------------------------------------------------//
    ?>

    wp-config.php
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'moorg_Wp786');

    /** MySQL database username */
    define('DB_USER', 'moorg_yaseen');

    /** MySQL database password */
    define('DB_PASSWORD', 'pa55word');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** 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', '');

    This time I didn't need to change the original database name.

  • look4

    i have done as mentioned here is the outcome:

    if i use the following: in db-config.php i get the following results:

    add_db_server('global', 'dc1', 1, 1,'74.55.156.66','74.55.156.66', 'moorg_global', 'moorg_yaseen', 'pa55word');

    add_db_server('0', 'dc1', 1, 1,'74.55.156.66','74.55.156.66', 'moorg_0', 'moorg_yaseen', 'pa55word');

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

    Warning: Cannot modify header information - headers already sent by (output started at /home/moorg/public_html/wp-content/db.php:669) in /home/moorg/public_html/wp-includes/functions.php on line 3191
    Error establishing a database connection

  • look4

    if i use the following:

    add_db_server('global', 'dc1', 1, 1,'74.55.156.66','localhost', 'moorg_global', 'moorg_yaseen', 'pa55word');

    add_db_server('0', 'dc1', 1, 1,'74.55.156.66','localhost', 'moorg_0', 'moorg_yaseen', 'pa55word');

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

    Warning: Cannot modify header information - headers already sent by (output started at /home/moorg/public_html/wp-content/db.php:669) in /home/moorg/public_html/wp-includes/functions.php on line 3191
    Error establishing a database connection

  • Larry_D

    This is the error I create when I modify the add_db_server lines to:
    add_db_server ('global', 'dc1', 1, 1,'173.247.249.5','173.247.249.5', 'moorg_global', 'moorg_yaseen', 'pa55word');

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

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

    When I change them back to:
    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'moorg_global', 'moorg_yaseen', 'pa55word');

    The websites work perfectly.

  • Larry_D

    Based on what you've shown I'd change the add-db-server lines to:
    add_db_server('global', 'dc1', 1, 1,'74.55.156.66','74.55.156.66', 'moorg_global', 'moorg_yaseen', 'pa55word');

    Once done. Run move script. If you get the error :
    Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/moorg/public_html/wp-content/db.php on line 669

    Go to your wp-config.php and change the database to point at your global.

    If that doesn't work. Post all your document settings so we can look through to see if we can determine where the error is.

  • Barry

    @look4 - let's start this from scratch in case we've missed something because that db-config.php looks ok to me from an initial look. Sorry for the basicness at this stage, but we may have missed something along the way

    1. How did you create the databases? within phpmyadmin, some other method or using cpanel?
    2. How did you create the user?
    3. How did you assign the user all privs to all the databases?
    4. If using cpanel - can you post a screenshot of your MySql cpanel page with the databases listed?

    Are you only getting that error on move-blogs? If you look in phpmyadmin (or whatever you have) what do the table counts look like? Does it look like the tables have actually been moved?

  • look4

    Barry:

    1. Cpanel was used to create them using MySQL when i tried to create them using a phpmyadmin sql query i was getting an error if i ran it through just the phpmyadmin sql panel

    2. Cpanel user was created again via MySQL and added to each table manually giving all privelleges.

    3. Again via cpanel and MySQL

    4. screenshots added.

    It wont load the move-blogs.php, if i try to navigate to the TLD http://www.mydomain.com it doesnt load.

  • Barry

    It wont load the move-blogs.php, if i try to navigate to the TLD http://www.mydomain.com it doesnt load.

    If you haven't run moveblogs.php yet, then you'll need to remove the db-php file first. rename that file or remove it then run move-blogs.php and let me know what it shows. You should initially get a page with the databases listed - if you can post that up before you run anything then I can do a quick check - also if you can zip up your move-blogs.php file with your settings / changes made then i'll have a quick look at that as well.

  • Larry_D

    look4, looking at the instruction for this install have you followed step 5. It deals specifically with uplading the files you've modified.

    Where did you upload the files? dp.php and dp-config.php must be in the wp-content folder.

    Create a folder called scripts and place it in the wp-content folder and place the move-blogs.php document in that folder.

    Then you type into the browser window the follow:
    http://www.yourdomainname/wp-content/scripts/move-blogs.php

    This brings up the attached window. (see screen capture)

    Then follow those steps. When you click on step #4 in the browser window you may see a bunch of code errors. Ignore them for the moment and scroll back to the instructions. Is the status of the db's green, if not click the #4 (click here) again. Scroll back again. Now are they green. If continue on to #6 clicking to refresh the screen.

    What do you see? Is there an error, if not. Go to the domain address now, what do you see?

    Side note, the setting in the dp plug appear correct. Your issues may be with how you setup the databases and privlidge/user settings in mysgl.
    -------------------
    Maybe it's time to start with new php multidb documents.

  • look4

    when i run the script i now get this:

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

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

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

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

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

    Also its worth noting here my db.php is not uploaded at all as per barrys suggestion
    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/moorg/public_html/wp-content/scripts/move-blogs.php on line 125

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

  • Barry

    is the db.php then obsolete? or required to be uploaded now at the end of the move blog process?

    Now you've moved all the tables to the right places - you should put db.php back in place.

    the moment i add that it breaks the site

    Right, so now we're looking at a db-config.php issue as we know that the user you put into the move-blogs.php file can both read and write to the multi-db databases. Can you confirm that the user and password settings for both the move-blogs and the db-config are the same?

  • Larry_D

    What about passwords?

    I two of our installs we had to change the wp-config.php database from the original to the new global and all work well.

    In your case you would change the current setting,
    define('DB_NAME', 'moorg_Wp786');
    to
    define('DB_NAME', 'moorg_global');

    If all the usernames and passwords are correct, give this a try. You can always turn it back. This forces the site to look to the global database.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.