More access problems with Multi DB

I am having the same problem as I had before, but I am doing what I did to correct the problem last time.

https://premium.wpmudev.org/forums/topic/installed-multi-db-cant-access-site

On the instal mentioned in the link above I started by putting the user name in the php config file as grace_wrdp1 as that is the user name in cpanel/mysql. Error messages when I tried to access my site indicated that the user name was the problem so I changed it in db-config.php to grace which is my cpanel login and it all worked perfectly.

This time I am trying to instal 16dbs on another domain and in the db-config.php I have put the user name as horsefr1 but when I go to http://www.horsefr.com/wp-admin I get an error message asking if horsefr1_wrdp1 has permission to access the database. I haven't put horsefr1_wrdp1 in the config file so I don't understand what is happening. (I have tried putting horse_wrdp1 in the config file but get the same message) Move-blogs php works and the blogs are in their new dbs, if I remove db.php I can create new blogs which go into the old db but if I then upload db.php I can move the new blog into the new dbs so its just the connection thing again, only the solution that worked last time doesn't seem to be working.
Any ideas again?

    Ayzola

    When I set up multi db on gracehorses.com the user name in the wp-config file and on the mysql database page was 'grace_wrdp1' but when I put that it the db-config file I couldn't access the site. I played around and put in 'grace' as the user name and since then it has worked perfectly.

    I am now doing horsefr.com. The user name in the wp-config file and on the mysql database page is 'horsefr1_wrdp1' . I have tried both that and 'horsefr1' in the db-config file but still can't access the db's, which are definatly there and move_blogs.php has moved the blogs into them. http://horsefr.com/wp-content/move-blogs.php
    Perhaps you can see the mistake in the db-config file.

    <?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', '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('horsefr1_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('0', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_global', 'horsefr1_wrdp1', ' ');
    add_db_server('0', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_0', 'horsefr1_wrdp1', ' ');
    add_db_server('1', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_1', 'horsefr1_wrdp1', ' ');
    add_db_server('2', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_2', 'horsefr1_wrdp1', ' ');
    add_db_server('3', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_3', 'horsefr1_wrdp1', ' ');
    add_db_server('4', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_4', 'horsefr1_wrdp1', ' ');
    add_db_server('5', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_5', 'horsefr1_wrdp1', ' ');
    add_db_server('6', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_6', 'horsefr1_wrdp1', ' ');
    add_db_server('7', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_7', 'horsefr1_wrdp1', ' ');
    add_db_server('8', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_8', 'horsefr1_wrdp1', ' ');
    add_db_server('9', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_9', 'horsefr1_wrdp1', ' ');
    add_db_server('a', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_a', 'horsefr1_wrdp1', ' ');
    add_db_server('b', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_b', 'horsefr1_wrdp1', '');
    add_db_server('c', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_c', 'horsefr1_wrdp1', ' ');
    add_db_server('d', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_d', 'horsefr1_wrdp1', ' ');
    add_db_server('e', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_e', 'horsefr1_wrdp1', ' ');
    add_db_server('f', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_f', 'horsefr1_wrdp1', ' ');

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

    ?>

    When I change the user name to 'horsefr1' the error message on http://www.horsefr1.com/wp-admin still asks if 'horsefr1_wrdp1' has permission to access the database.
    I've also tried reuploading the db.php file as was suggested before.
    Thanks for all your time
    Suzanne

    Barry

    Ok, lots of problems with that config file - so I'll go through

    1. Remove this line unless you have a table called wp_horsefr1_wrdp1_global on your database.
    add_global_table('horsefr1_wrdp1_global');

    2. Your db lines are wrong - you have:
    add_db_server('0', 'dc1', 1, 1,'','69.175.77', 'horsefr1_wrdp1_global', 'horsefr1_wrdp1', ' ');

    You should have:
    add_db_server('0', 'dc1', 1, 1,'IPADDRESS','IPADDRESS', 'horsefr1_wrdp1_global', 'horsefr1_wrdp1', ' ');

    Note where I have put IPADDRESS - you need to put the FULL Ip address of your database server (or web-server if it is local), you only seem to have the first 3 parts.

    Ayzola

    @Barry
    I've made the changes to db-config.php so it is now like this, but the result is the same.

    I have a question, If I were to put a random user name eg 'tree' in the db-config file and then went to horsefr.com/wp-admin. Should the error message then ask does 'tree' have permission to access the database? I have tried other user names and it always asks if horsefr1_wrdp1 has permission even when horsefr1_wrdp1 isn't in the file. Does it pick that up from another file or is it not reading the db-config file? (Hope I am making at least a little sense.)

    <?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', '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');
    //------------------------------------------------------------------------//
    //---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.74','69.175.77.74', 'horsefr1_wrdp1_global', 'horsefr1_wrdp1', ' ');
    add_db_server('0', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_0', 'horsefr1_wrdp1', ' ');
    add_db_server('1', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_1', 'horsefr1_wrdp1', ' ');
    add_db_server('2', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_2', 'horsefr1_wrdp1', ' ');
    add_db_server('3', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_3', 'horsefr1_wrdp1', ' ');
    add_db_server('4', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_4', 'horsefr1_wrdp1', ' ');
    add_db_server('5', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_5', 'horsefr1_wrdp1', ' ');
    add_db_server('6', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_6', 'horsefr1_wrdp1', ' ');
    add_db_server('7', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_7', 'horsefr1_wrdp1', ' ');
    add_db_server('8', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_8', 'horsefr1_wrdp1', ' ');
    add_db_server('9', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_9', 'horsefr1_wrdp1', '');
    add_db_server('a', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_a', 'horsefr1_wrdp1', ' ');
    add_db_server('b', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_b', 'horsefr1_wrdp1', ' ');
    add_db_server('c', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_c', 'horsefr1_wrdp1', ' ');
    add_db_server('d', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_d', 'horsefr1_wrdp1', '');
    add_db_server('e', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_e', 'horsefr1_wrdp1', ' ');
    add_db_server('f', 'dc1', 1, 1,'69.175.77.74','69.175.77.74', 'horsefr1_wrdp1_f', 'horsefr1_wrdp1', ' ');
    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_vip_blog(BLOG_ID, DS)
    // EX: add_vip_blog(1, 'vip1');

    ?>

    Ayzola

    Just an quick update. After considering deleting everything and starting from scratch with just the one db for each site and waiting till I had money to get someone to set it up, I decided to have one last go at trying the impossible.
    I thought that if the files for gracehorses worked that I'd try them in the other blogs so I downloaded them uploaded them to zazinne.com and horsefr.com and then edited the database and user names and password and lo and behold it all works.

    So I'm relieved again, just got the problem of stretchy widgets to sort out now! Then find some new plug-in to try! Oh what fun, My partner thinks I'm nuts but I'm really enjoying this!