How do I find my old DB password

Tried to access move_blogs ---

I can't find the old DB password -- I copied out of the config file but it did not work -- now I can't access the install at all.

Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'theactio'@'localhost' (using password: NO) in /home/theactio/public_html/wp-content/db.php on line 705

Warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /home/theactio/public_html/wp-content/db.php on line 705

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 theactio_global database.

Are you sure it exists?
Does the user theactio_wrdp1 have permission to use the theactio_global database?
On some systems the name of your database is prefixed with your username, so it would be like username_theactio_global. Could that be the problem?

  • aristath

    As mentioned in the usage page of the plugin:

    One final step is to make sure you have assigned a username and password to be associated with each database. This could be the same as your username and password for the original WordPress database. It’s up to you, just make sure that there IS a username and password associated with each one and note what it is. You’ll need this information for the next step.

    You can simply add your already existing user to all your databases and assign them administrative rights.

    I hope that helps!

    Cheers,
    Ari.

  • mindset

    I did not see that anywhere in the documentation -- though I assumed you needed to ---

    but that is alot of steps for just 256 sites -- let alone 4096 --

    is there a way to do it - in a quick fashion?????

    to set permissions on a DB -- it is about a 5 steep process - you have to add the user, then set the permissions, and then save it -- etc ---

    I would think there has to be a way to set those in the sql when you create the DBs

  • mindset

    ok --- I figured out that problem -- the IP address I grabbed from my cpanel was the last logged in --IP -- not the dedicated IP --- DUH!!!!

    but now ----

    it ran -- showed me all the DB-s and were green --

    but then when I ran the copy step --- I got the following errors

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

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

    now when I try to login to wp-admin -- I get these errors also

    Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/theactio/public_html/wp-includes/wp-db.php on line 650

  • mindset

    it looks like it copied all of my info from wrdp1 to global -- and then did not create tables in any of the DB's after that --

    my db-config.php has --

    I created 256DBs -- one global entry and 4 vip entries into the db-config.php

    with the 256 add_db's after that -----

    add_dc_ip('localhost', 'dc1');
    add_global_table('theactio_global');

    add_db_server('global', 'dc1', 1, 1,'','localhost', 'theactio_global', 'dbname', 'pswd');
    add_db_server('vip1', 'dc1', 1, 1,'','localhost', 'theactio_vip1', 'dbname', 'pswd');
    add_db_server('vip2', 'dc1', 1, 1,'','localhost', 'theactio_vip2', 'dbname', 'pswd');
    add_db_server('vip3', 'dc1', 1, 1,'','localhost', 'theactio_vip3', 'dbname', 'pswd');
    add_db_server('vip4', 'dc1', 1, 1,'','localhost', 'theactio_vip4', 'dbname', 'pswd');
    add_db_server('00', 'dc1', 1, 1,'','localhost', 'theactio_00', 'dbname', 'pswd');
    and the the rest of the dbs'

    the only difference of the above and what I actually ran was the IP address instead of localhost ---

    ok -- I also need to know how to fix what has been created so I can run it again --
    if the global is the only DB that tables were created in ---- can I just drop all the tables - and run it again ????

  • mindset

    So why did it only copy to the globals ------ I thought the global was for special -- manually directed blogs -- by the add vip process ---

    What I need to know ---- it did not copy the existing db's to the appropriate new db structure --

    It does me no good to run it again -- if the same thing is going to happen again ---

    so what is wrong with my setup ---- that caused it to copy all the existing blogs to global -- vs db-0 db-1 db-2

  • Barry

    Can you post your db-config.php file to something like pastebin.com (remove the user names and passwords first) so we can take a look and reference any pagelines directly (so we both know what lines we're referring to). I can see two issues already on the excerpt you posted.

    Not sure which other questions you have that are answered but:

    it seems that none of the new DB's have users or passwiords --

    Do I have to create all of those manually????

    Yes, though if you want to run move-blogs.php then you should assign the same user (and associated username / password) to all of them.

  • mindset

    I still have not figured out this system -- half of my responses do not get posted -- I login to my wp backoffice with wpdev dashboard installed -- and I can't reply to the topics ---- it seems to me that you should automatically be logged in ----but now I have figured out that I have to login manually everytime or my wp can't acess the reply to topics ---- it displays all the current stuff -- but wont let you respond --

    Back to the above -- I have responded twice but it does not appear anywhere ---

    anyhow --- I manually added a user(with all permissions) to each DB - 3 hour task ----
    I have no idea what you mean by pastebin.com -- that makes no sense --

    Look I included a copy of my statements above --- since the only db it is copying to is the global --- it is not getting past that first line -- and so what I have included above should be enough to determine what is wrong ----

  • mindset

    I changed the areas where your instructions stated to put IP address, to localhost ----
    dropped all of the database tables ---

    ran move-blogs again and it gave me the same -- free space warnings - -- so I ran it a second time and the table came back with errors, and I refreshed it -- and it came back good ----

    So I am not sure what the issues are --

    so I dropped all the tables again --- and re-ran it -- got the same free space errors --- and not table came up again --- so I re-ran move-blogs and the table came up with problems, refreshed the table and everything was good.-

  • Barry

    Thanks for uploading the db-config.php - based on the line numbers in the GIST:

    Line 16 is wrong - it needs to be the first three parts of the IP address (see comment on line above).

    Line 26 is wrong - unless you have a table in your global database called 'dbname_global' then this may cause issues.

    Every add_db_server line - change the '' to be the same address of the server - you have localhost as your server - if possible change that and the '' to 127.0.0.1

  • mindset

    on line 16 -- when I had the IP address in there - it did not work at all -- it wasn't until I changed it to localhost that it worked - besides the warning errors

    line 26 was changed -- I did not want to put the actual db name --- there -- it matches the rest --

    127.0.0.1 is the same as localhost --- so I do not see where that would do anything different ---- though maybe it would get rid of the warning messages I got --

    I tried all the methods you have stated -- and the only thing that seemed to work is localhost --- and the DB's seem to be distributed and everything seems to work ----

    I have dropped DB's and started over numerous times and never got it to run without the warning messages and the process I described above -----

    Is there a way to know if it is installed properly? if something is not installed right -- what can I expect to happen to determine an error??

    The original instructions were well written but did not have enough detail in them for me, so have enhanced the instruction process, but I don't want to give it you guys until I really know what caused the warning messages and what I did worked --

    I have spent a lot of hours testing and re-testing on this issue -- while I was waiting on you all --- I have gotten an awesome response time on most issues -- but this issue has been a problem for over a week and I could not sit and just wait ....

    The bad part -- is I still do not for sure that it is installed correctly --- so far it works and I have not encountered any problems --- but I have some more sites to install it on -- so I will refine with the next install ---

    if you could explain to me -- why you think that 127.0.0.1 would work better than localhost???

    and putting the ip on line 16 definitely does not work -- at least on my server --

  • Barry

    if you could explain to me -- why you think that 127.0.0.1 would work better than localhost???

    Because the code (along with the dc_ip line) calculates which server to use for reading and writing based on the first three parts of an IP address - it is designed to handle multiple servers and master-slave write/read-only databases, so does a lot of sorting based on local ip address / remote ip addresses and prioritising behind the scenes.

  • Barry

    127.0.0.1 is the same as localhost --- so I do not see where that would do anything different ---- though maybe it would get rid of the warning messages I got --

    No, as I wrote above the system works based on IP addresses behind the scenes (calulcating what is a local db, what is a remote db, etc... and estimating which would provide the fastest response time, and which to fall back on if it can't connect to that server, etc...) It may point to the same place, but the plugin is designed to work with IP addresses for that reason.

    Whilst it isn't going to do much with only a single set of servers - when you come to add more, the IP addresses are really needed.

  • Barry

    I have spent a lot of hours testing and re-testing on this issue -- while I was waiting on you all --- I have gotten an awesome response time on most issues -- but this issue has been a problem for over a week and I could not sit and just wait ....

    I'm sorry for the slow response, I got back as soon as the files were uploaded. Multi-db is quite an advanced thing to setup as it requires quite a diverse set of skills and planning - the sql db setup and user creation / permission granting isn't something that most people do on a day-to-day basis and there are a lot of little niggles that creep in.

    Usually it isn't needed until a site gets to a certain age, as the advantages are limited really if you are running your database server on the same machine as your webserver. When you introduce a second server then it really comes into it's own :slight_smile:

  • mindset

    Barry,

    I wasn't really complaining about your response time -- I have a lot of problems with this support system and I am obviously missing some understanding of how it works -- I try to access it from my WP dashboard -- and reply's do not show up -- it won't let me enter replies -- and replies I entered do not show up --- and so there have been days of delays - then I get responses which I have no idea what they are talking about -- such as one person told me to use paint.com site and then gist.com ---- these sites might be things you use all the time -- but they were foreign to me -- and it took me hours -- to even figure out how they worked -- I pasted and pasted and saved and it never came back with a url -- so I might have 50 pages out there for all I know --- then I noticed the place to put file name --- and then it worked -- but anyhow ------- there are days between responses so it takes 4-5 days just for clarification -- anyhow -- not complaining just frustrated --

    You guys give awesome support -- and I have made numerous compliments to this whole system and I feel fortunate to be a member of this fine group ---

    On to your comments ---

    Line 16 is wrong - it needs to be the first three parts of the IP address (see comment on line above).

    Line 26 is wrong - unless you have a table in your global database called 'dbname_global' then this may cause issues.

    Every add_db_server line - change the '' to be the same address of the server - you have localhost as your server - if possible change that and the '' to 127.0.0.1

    Your instructions on the site are very confusing -- you have add_dc_ip('127.0.0.1', 'dc1'); on line 16 -- the line before it says '123.123.123.' and the written instructions says,

    Line 16: Don’t let this scare you. It just needs your server’s IP address.
    Line 25: Provide the same name you assigned for your global database in Step 2. example ‘dbname_global’

    The first three parts of the IP address it needs, not the full IP - see the comment example on the line above it to see what I mean.

    i see that now -- but the instructions say nothing of the first 3 parts -- it says IP address --
    and as far as line 25 -- I did exactly as the instructions says -- so I am not sure what I did wrong still ---- on line 25 --

    OK - -I am going to drop all my tables again on the DB's -- I am going to change line 16 to 127.0.0 and I am going to put 127.0.0.1 everywhere where I have localhost now - and the remote host will be '' since I do not have a remote host presently -- and I will re run it --- to see what happens

    Please let me know what I am supposed to put on line 25

    Now I have asked this question before - but I am not sure if you are the one who responded originally but it seems like you really know this plugin -- so I will eventually need 4096 DB's and they will be on different servers at some point --- In discussions with your support -- I didn't want to go to straight 4096 because right now I am on a shared server --- and until I move to a dedicated server or the cloud -- I can't really do 4096 ---- so I was told that It would be beneficial for me to go ahead and start at 256 --- then expand to 4096 later --- I have been told twice that this is possible and it says so in the instructions but I have yet to find that in the instructions -- so can I go from 256 to 4096 later ---

    Thanks for all of you explanations by the way -- it is helping me understand the plugin at a deeper level

  • mindset

    Well the same thing happened again ----
    i tried creating a file at gist again -- but could not get it to work

    so here is the code -- I changed the username adn pasword and db prefix to random and put xxx.xxx.xxx in the 3 part ip address rather than the real

    <?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'); Notice that it is only 3 parts of the IP
    add_dc_ip('XXX.XXX.XXX.', '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('myprefix_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
    add_db_server('global', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_global', 'username', 'password');
    add_db_server('vip1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_vip1', 'username', 'password');
    add_db_server('vip2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_vip2', 'username', 'password');
    add_db_server('vip3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_vip3', 'username', 'password');
    add_db_server('vip4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_vip4', 'username', 'password');
    add_db_server('00', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_00', 'username', 'password');
    add_db_server('01', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_01', 'username', 'password');
    add_db_server('02', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_02', 'username', 'password');
    add_db_server('03', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_03', 'username', 'password');
    add_db_server('04', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_04', 'username', 'password');
    add_db_server('05', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_05', 'username', 'password');
    add_db_server('06', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_06', 'username', 'password');
    add_db_server('07', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_07', 'username', 'password');
    add_db_server('08', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_08', 'username', 'password');
    add_db_server('09', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_09', 'username', 'password');
    add_db_server('0a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0a', 'username', 'password');
    add_db_server('0b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0b', 'username', 'password');
    add_db_server('0c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0c', 'username', 'password');
    add_db_server('0d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0d', 'username', 'password');
    add_db_server('0e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0e', 'username', 'password');
    add_db_server('0f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_0f', 'username', 'password');
    add_db_server('10', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_10', 'username', 'password');
    add_db_server('11', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_11', 'username', 'password');
    add_db_server('12', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_12', 'username', 'password');
    add_db_server('13', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_13', 'username', 'password');
    add_db_server('14', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_14', 'username', 'password');
    add_db_server('15', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_15', 'username', 'password');
    add_db_server('16', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_16', 'username', 'password');
    add_db_server('17', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_17', 'username', 'password');
    add_db_server('18', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_18', 'username', 'password');
    add_db_server('19', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_19', 'username', 'password');
    add_db_server('1a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1a', 'username', 'password');
    add_db_server('1b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1b', 'username', 'password');
    add_db_server('1c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1c', 'username', 'password');
    add_db_server('1d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1d', 'username', 'password');
    add_db_server('1e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1e', 'username', 'password');
    add_db_server('1f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_1f', 'username', 'password');
    add_db_server('20', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_20', 'username', 'password');
    add_db_server('21', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_21', 'username', 'password');
    add_db_server('22', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_22', 'username', 'password');
    add_db_server('23', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_23', 'username', 'password');
    add_db_server('24', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_24', 'username', 'password');
    add_db_server('25', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_25', 'username', 'password');
    add_db_server('26', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_26', 'username', 'password');
    add_db_server('27', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_27', 'username', 'password');
    add_db_server('28', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_28', 'username', 'password');
    add_db_server('29', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_29', 'username', 'password');
    add_db_server('2a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2a', 'username', 'password');
    add_db_server('2b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2b', 'username', 'password');
    add_db_server('2c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2c', 'username', 'password');
    add_db_server('2d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2d', 'username', 'password');
    add_db_server('2e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2e', 'username', 'password');
    add_db_server('2f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_2f', 'username', 'password');
    add_db_server('30', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_30', 'username', 'password');
    add_db_server('31', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_31', 'username', 'password');
    add_db_server('32', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_32', 'username', 'password');
    add_db_server('33', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_33', 'username', 'password');
    add_db_server('34', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_34', 'username', 'password');
    add_db_server('35', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_35', 'username', 'password');
    add_db_server('36', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_36', 'username', 'password');
    add_db_server('37', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_37', 'username', 'password');
    add_db_server('38', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_38', 'username', 'password');
    add_db_server('39', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_39', 'username', 'password');
    add_db_server('3a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3a', 'username', 'password');
    add_db_server('3b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3b', 'username', 'password');
    add_db_server('3c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3c', 'username', 'password');
    add_db_server('3d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3d', 'username', 'password');
    add_db_server('3e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3e', 'username', 'password');
    add_db_server('3f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_3f', 'username', 'password');
    add_db_server('40', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_40', 'username', 'password');
    add_db_server('41', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_41', 'username', 'password');
    add_db_server('42', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_42', 'username', 'password');
    add_db_server('43', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_43', 'username', 'password');
    add_db_server('44', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_44', 'username', 'password');
    add_db_server('45', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_45', 'username', 'password');
    add_db_server('46', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_46', 'username', 'password');
    add_db_server('47', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_47', 'username', 'password');
    add_db_server('48', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_48', 'username', 'password');
    add_db_server('49', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_49', 'username', 'password');
    add_db_server('4a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4a', 'username', 'password');
    add_db_server('4b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4b', 'username', 'password');
    add_db_server('4c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4c', 'username', 'password');
    add_db_server('4d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4d', 'username', 'password');
    add_db_server('4e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4e', 'username', 'password');
    add_db_server('4f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_4f', 'username', 'password');
    add_db_server('50', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_50', 'username', 'password');
    add_db_server('51', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_51', 'username', 'password');
    add_db_server('52', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_52', 'username', 'password');
    add_db_server('53', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_53', 'username', 'password');
    add_db_server('54', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_54', 'username', 'password');
    add_db_server('55', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_55', 'username', 'password');
    add_db_server('56', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_56', 'username', 'password');
    add_db_server('57', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_57', 'username', 'password');
    add_db_server('58', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_58', 'username', 'password');
    add_db_server('59', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_59', 'username', 'password');
    add_db_server('5a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5a', 'username', 'password');
    add_db_server('5b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5b', 'username', 'password');
    add_db_server('5c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5c', 'username', 'password');
    add_db_server('5d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5d', 'username', 'password');
    add_db_server('5e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5e', 'username', 'password');
    add_db_server('5f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_5f', 'username', 'password');
    add_db_server('60', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_60', 'username', 'password');
    add_db_server('61', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_61', 'username', 'password');
    add_db_server('62', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_62', 'username', 'password');
    add_db_server('63', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_63', 'username', 'password');
    add_db_server('64', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_64', 'username', 'password');
    add_db_server('65', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_65', 'username', 'password');
    add_db_server('66', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_66', 'username', 'password');
    add_db_server('67', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_67', 'username', 'password');
    add_db_server('68', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_68', 'username', 'password');
    add_db_server('69', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_69', 'username', 'password');
    add_db_server('6a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6a', 'username', 'password');
    add_db_server('6b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6b', 'username', 'password');
    add_db_server('6c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6c', 'username', 'password');
    add_db_server('6d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6d', 'username', 'password');
    add_db_server('6e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6e', 'username', 'password');
    add_db_server('6f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_6f', 'username', 'password');
    add_db_server('70', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_70', 'username', 'password');
    add_db_server('71', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_71', 'username', 'password');
    add_db_server('72', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_72', 'username', 'password');
    add_db_server('73', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_73', 'username', 'password');
    add_db_server('74', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_74', 'username', 'password');
    add_db_server('75', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_75', 'username', 'password');
    add_db_server('76', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_76', 'username', 'password');
    add_db_server('77', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_77', 'username', 'password');
    add_db_server('78', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_78', 'username', 'password');
    add_db_server('79', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_79', 'username', 'password');
    add_db_server('7a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7a', 'username', 'password');
    add_db_server('7b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7b', 'username', 'password');
    add_db_server('7c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7c', 'username', 'password');
    add_db_server('7d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7d', 'username', 'password');
    add_db_server('7e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7e', 'username', 'password');
    add_db_server('7f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_7f', 'username', 'password');
    add_db_server('80', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_80', 'username', 'password');
    add_db_server('81', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_81', 'username', 'password');
    add_db_server('82', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_82', 'username', 'password');
    add_db_server('83', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_83', 'username', 'password');
    add_db_server('84', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_84', 'username', 'password');
    add_db_server('85', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_85', 'username', 'password');
    add_db_server('86', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_86', 'username', 'password');
    add_db_server('87', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_87', 'username', 'password');
    add_db_server('88', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_88', 'username', 'password');
    add_db_server('89', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_89', 'username', 'password');
    add_db_server('8a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8a', 'username', 'password');
    add_db_server('8b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8b', 'username', 'password');
    add_db_server('8c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8c', 'username', 'password');
    add_db_server('8d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8d', 'username', 'password');
    add_db_server('8e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8e', 'username', 'password');
    add_db_server('8f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_8f', 'username', 'password');
    add_db_server('90', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_90', 'username', 'password');
    add_db_server('91', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_91', 'username', 'password');
    add_db_server('92', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_92', 'username', 'password');
    add_db_server('93', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_93', 'username', 'password');
    add_db_server('94', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_94', 'username', 'password');
    add_db_server('95', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_95', 'username', 'password');
    add_db_server('96', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_96', 'username', 'password');
    add_db_server('97', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_97', 'username', 'password');
    add_db_server('98', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_98', 'username', 'password');
    add_db_server('99', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_99', 'username', 'password');
    add_db_server('9a', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9a', 'username', 'password');
    add_db_server('9b', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9b', 'username', 'password');
    add_db_server('9c', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9c', 'username', 'password');
    add_db_server('9d', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9d', 'username', 'password');
    add_db_server('9e', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9e', 'username', 'password');
    add_db_server('9f', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_9f', 'username', 'password');
    add_db_server('a0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a0', 'username', 'password');
    add_db_server('a1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a1', 'username', 'password');
    add_db_server('a2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a2', 'username', 'password');
    add_db_server('a3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a3', 'username', 'password');
    add_db_server('a4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a4', 'username', 'password');
    add_db_server('a5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a5', 'username', 'password');
    add_db_server('a6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a6', 'username', 'password');
    add_db_server('a7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a7', 'username', 'password');
    add_db_server('a8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a8', 'username', 'password');
    add_db_server('a9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_a9', 'username', 'password');
    add_db_server('aa', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_aa', 'username', 'password');
    add_db_server('ab', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ab', 'username', 'password');
    add_db_server('ac', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ac', 'username', 'password');
    add_db_server('ad', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ad', 'username', 'password');
    add_db_server('ae', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ae', 'username', 'password');
    add_db_server('af', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_af', 'username', 'password');
    add_db_server('b0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b0', 'username', 'password');
    add_db_server('b1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b1', 'username', 'password');
    add_db_server('b2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b2', 'username', 'password');
    add_db_server('b3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b3', 'username', 'password');
    add_db_server('b4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b4', 'username', 'password');
    add_db_server('b5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b5', 'username', 'password');
    add_db_server('b6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b6', 'username', 'password');
    add_db_server('b7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b7', 'username', 'password');
    add_db_server('b8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b8', 'username', 'password');
    add_db_server('b9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_b9', 'username', 'password');
    add_db_server('ba', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ba', 'username', 'password');
    add_db_server('bb', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_bb', 'username', 'password');
    add_db_server('bc', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_bc', 'username', 'password');
    add_db_server('bd', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_bd', 'username', 'password');
    add_db_server('be', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_be', 'username', 'password');
    add_db_server('bf', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_bf', 'username', 'password');
    add_db_server('c0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c0', 'username', 'password');
    add_db_server('c1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c1', 'username', 'password');
    add_db_server('c2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c2', 'username', 'password');
    add_db_server('c3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c3', 'username', 'password');
    add_db_server('c4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c4', 'username', 'password');
    add_db_server('c5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c5', 'username', 'password');
    add_db_server('c6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c6', 'username', 'password');
    add_db_server('c7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c7', 'username', 'password');
    add_db_server('c8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c8', 'username', 'password');
    add_db_server('c9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_c9', 'username', 'password');
    add_db_server('ca', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ca', 'username', 'password');
    add_db_server('cb', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_cb', 'username', 'password');
    add_db_server('cc', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_cc', 'username', 'password');
    add_db_server('cd', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_cd', 'username', 'password');
    add_db_server('ce', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ce', 'username', 'password');
    add_db_server('cf', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_cf', 'username', 'password');
    add_db_server('d0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d0', 'username', 'password');
    add_db_server('d1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d1', 'username', 'password');
    add_db_server('d2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d2', 'username', 'password');
    add_db_server('d3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d3', 'username', 'password');
    add_db_server('d4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d4', 'username', 'password');
    add_db_server('d5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d5', 'username', 'password');
    add_db_server('d6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d6', 'username', 'password');
    add_db_server('d7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d7', 'username', 'password');
    add_db_server('d8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d8', 'username', 'password');
    add_db_server('d9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_d9', 'username', 'password');
    add_db_server('da', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_da', 'username', 'password');
    add_db_server('db', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_db', 'username', 'password');
    add_db_server('dc', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_dc', 'username', 'password');
    add_db_server('dd', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_dd', 'username', 'password');
    add_db_server('de', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_de', 'username', 'password');
    add_db_server('df', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_df', 'username', 'password');
    add_db_server('e0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e0', 'username', 'password');
    add_db_server('e1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e1', 'username', 'password');
    add_db_server('e2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e2', 'username', 'password');
    add_db_server('e3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e3', 'username', 'password');
    add_db_server('e4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e4', 'username', 'password');
    add_db_server('e5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e5', 'username', 'password');
    add_db_server('e6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e6', 'username', 'password');
    add_db_server('e7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e7', 'username', 'password');
    add_db_server('e8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e8', 'username', 'password');
    add_db_server('e9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_e9', 'username', 'password');
    add_db_server('ea', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ea', 'username', 'password');
    add_db_server('eb', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_eb', 'username', 'password');
    add_db_server('ec', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ec', 'username', 'password');
    add_db_server('ed', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ed', 'username', 'password');
    add_db_server('ee', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ee', 'username', 'password');
    add_db_server('ef', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ef', 'username', 'password');
    add_db_server('f0', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f0', 'username', 'password');
    add_db_server('f1', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f1', 'username', 'password');
    add_db_server('f2', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f2', 'username', 'password');
    add_db_server('f3', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f3', 'username', 'password');
    add_db_server('f4', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f4', 'username', 'password');
    add_db_server('f5', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f5', 'username', 'password');
    add_db_server('f6', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f6', 'username', 'password');
    add_db_server('f7', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f7', 'username', 'password');
    add_db_server('f8', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f8', 'username', 'password');
    add_db_server('f9', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_f9', 'username', 'password');
    add_db_server('fa', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fa', 'username', 'password');
    add_db_server('fb', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fb', 'username', 'password');
    add_db_server('fc', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fc', 'username', 'password');
    add_db_server('fd', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fd', 'username', 'password');
    add_db_server('fe', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fe', 'username', 'password');
    add_db_server('ff', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_ff', 'username', 'password');

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

    add_vip_blog(1, 'vip1');
    ?>

    then the move-blogs

    ///DB Settings
    $dbname = "myprefix_wrdp1"; //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 = 'myprefix_'; //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 = 'username';
    $dbpass = 'password';

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

    when I ran --- move-blogs ---
    it ran -- showed me all the DB-s and were green --

    but then when I ran the copy step --- I got the following errors

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

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

    at the bottom of those errors was the table again and everything looked good --
    it said DB existed and table in new db

    Hit refresh and the table came back -- looking good --

    but I am still getting the warning messages ---
    everything was green --- DB's existed and tables in DB

  • Barry

    add_global_table('myprefix_global');

    You still have that line in there - I'm assuming you don't have a table called 'myprefix_global' (or whatever it was originally) in your global database - so this line should really be removed as it may cause issues.

    add_db_server('fb', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_fb', 'username', 'password');

    You still haven't changed the '' before the IP address to be the same as the IP.

    Both I mentioned here:
    https://premium.wpmudev.org/forums/topic/how-do-i-find-my-old-db-password#post-469768

    You can usually ignore those warning messages in move-blogs.php ( I know, it's in the middle of being scrapped as I'm writing a different method to use in the new multi-db ) - if it reports with everything as green, and then you look in your phpmyadmin (or whatever method you use to view your database) and you see blog tables in some of the other databases - then you are good to go.

    The only warnings to worry about are like those in your first post - as they mean the username and password / permissions are wrong for each database *or* you haven't flushed your privileges after granting permissions to those users.

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'theactio'@'localhost' (using password: NO) in /home/theactio/public_html/wp-content/db.php on line 705

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /home/theactio/public_html/wp-content/db.php on line 705

    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 theactio_global database.

  • mindset

    add_global_table('myprefix_global');

    You still have that line in there - I'm assuming you don't have a table called 'myprefix_global' (or whatever it was originally) in your global database - so this line should really be removed as it may cause issues.

    Look -- I am just doing what the instructions say ---- so I am not sure what I am doing right or wrong here -- I don't know if I have any tables in global -- since I have no idea what global is for???? other than it is required if you want to seperate sites into their own databases VIP1 etc --- so I am assuming the plugin loads tables into global that allows the system to handle remote DB's or seperated DB's --- so nowhere does it say to remove it ---- it says to put your dbname in it the same as you used in step 2 -- which I did ---

    So what is it for? what does it do?

    as far as the IP -- you told me to change it

    Every add_db_server line - change the '' to be the same address of the server - you have localhost as your server - if possible change that and the '' to 127.0.0.1

    I have no idea what you mean by the following statement

    You still haven't changed the '' before the IP address to be the same as the IP.

    add_db_server('da', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_da', 'username', 'password');

    so what do I put in here -- my actual IP address in place of 127.0.0.1 ??????

    I sitll don't understand the changes you want me to make ----

    I guess I am alright -- since it seems to load ---- and distribute --

    Also you missed my questions regarding going from 296 to 4096 and is it possible

  • Barry

    I have no idea what you mean by the following statement

    Change
    add_db_server('da', 'dc1', 1, 1,'','127.0.0.1', 'myprefix_da', 'username', 'password');
    to
    add_db_server('da', 'dc1', 1, 1,'127.0.0.1','127.0.0.1', 'myprefix_da', 'username', 'password');

    so what do I put in here -- my actual IP address in place of 127.0.0.1 ??????

    127.0.0.1 is fine - you just need to fill in the blank parameter.

    Look -- I am just doing what the instructions say ---- so I am not sure what I am doing right or wrong here -- I don't know if I have any tables in global -- since I have no idea what global is for????

    A global table is a table that you want to force to be in the global database - standard tables are ones like wp_users, wp_blogs, wp_usermeta, wp_sites, etc...

    You don't have a table called "myprefix_global" (as you don't know what I mean by global table, then I'm pretty confident this table doesn't exist in your global database :slight_smile: ), so telling multi-db that you do have a table with that name in your global database (which this line does "add_global_table") means that it is looking for something that doesn't exist.

    So you need to delete this line.

  • mindset

    Thanks Barry --- you have been great -- still want to clarify a few things

    Ok barry -- so in the remote spot -- use the 127.0.0.1 -- that is different from the instructions -- the instructions say to leave it blank if you are not using a remote server --

    the global -- aspect says to use the dbname from step2 -- ok so --

    I will put the 127.0.0.1 for the remote servers, and remove the global name ---

    Now -- I still do not understand what the global tables are for --- What do you mean by global tables --- and by your definition -- wouldn't I naturally have global databases -- since you would need standard tables are ones like wp_users, wp_blogs, wp_usermeta, wp_sites, etc... wouldn't you? I believe the move creates tables in the global doesn't it?

    I just looked and it does -- tables such as communities, affiliates etc--

    So under what conditions -- would you leave that add globals table command in the code???

  • Barry

    Now -- I still do not understand what the global tables are for --- What do you mean by global tables --- and by your definition -- wouldn't I naturally have global databases -- since you would need standard tables are ones like wp_users, wp_blogs, wp_usermeta, wp_sites, etc... wouldn't you? I believe the move creates tables in the global doesn't it?

    The plugin knows about the standard WP and BP global tables. A global table is something that is used by *all* blogs / sites on your install. A local table is specific to a certain blog / site.

    e.g.
    wp_users - holds the user details for all the users across the entire site

    wp_3_posts - holds the posts for the blog / site with the id of 3

    The first is a global table and so goes in the global database, the second is a local table and so goes in the database that all the other tables for the blog / site is in.

    Now I might want to introduce a new plugin that allows my blog / site owners to work out the country that their users are from based on their IP address - to do this I need a very large table with that information in. I don't want to store a copy for each blog / site across the whole network , instead I'll store it once in the global database (say it's called wp_geolocation) and add:

    add_global_table('geolocation');

    to my db-config.php - now when a query in a plugin looks for that table it looks in the global database instead of a local one.

  • Barry

    Ok barry -- so in the remote spot -- use the 127.0.0.1 -- that is different from the instructions -- the instructions say to leave it blank if you are not using a remote server --

    When the add_dc_ip line is correct, then the plugin can detect that the db server is local and so will always use the local IP address - and in that case, the remote IP address can, indeed, be left blank.

    However, unfortunately in 3 years, I've answered a lot of questions where the plugin can't connect to the database, and that is invariably because the add_dc_ip isn't correct, is 'localhost' or contains the full IP address instead of the parts it wants - when the dc_ip is wrong, the plugin thinks that the db server is remote and tries to connect using the remote IP address - which is usually blank and so it can't.

    So every time I get a support post now I always say to add the same IP address to the remote parameter as well to cover every eventuality. With a correct dc_ip and the same IP in both parameters - you are pretty much bullet proof with regards to having an address for the plugin to connect to - all that then remains is to ensure the user permissions / accounts are correct.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.