Need Help Installing Multi DB

I still don't get clear instruction how to install multi db plugin...

1. I have do all step in the instruction.
2. Upload both the db.php and db-config.php files to your wp-content directory.
3. upload move-blogs.php inside wp-content called "scripts" and uploading the file there.
4. double check

But I still don't know where to put folder "multidb" in zip file (plugin>>multidb)?

When I put the multidb folder into wp-content>>plugins folder I get this message

Houston, we have a problem!
Looks like you need to create your new db's! If you're lucky, this link still works - click me
Database Error: Unknown database 'wp_global'

  • ardentwire
    <?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('216.180.243.67', '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('aw1ms2_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,'','', 'misiedum_aw1ms2_global', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    
    add_db_server('0', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_0', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('1', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_1', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('2', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_2', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('3', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_3', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('4', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_4', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('5', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_5', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('6', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_6', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('7', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_7', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('8', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_8', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('9', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_9', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('a', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_a', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('b', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_b', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('c', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_c', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('d', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_d', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('e', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_e', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    add_db_server('f', 'dc1', 1, 1,'','', 'misiedum_aw1ms2_f', 'misiedum_taro',  'w87nc=dcAW&|BS8r9P');
    
    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //	Usage: add_vip_blog(BLOG_ID, DS)
    //	EX: add_vip_blog(1, 'vip1');
    
    add_vip_blog(1, 'vip1');
    ?>
  • Barry

    aw1ms2_global is the name of the global database. I dont know if the table with the same name exist.

    If you didn't create a table with that name, then I suggest that it doesn't exist no, so that line needs to be removed otherwise you are going to get a lot of problems.

    is the main database (aw1ms2) is actually the global database?

    Have you specified the main database as the global database? You needed to have either created a global database as part of your set up, or specified that you would be using your existing single database as the global one as part of your multi-db set up.

    If yes, how to add this global table?

    What would that table contain, and what structure would it have?

  • ardentwire

    If you didn't create a table with that name, then I suggest that it doesn't exist no, so that line needs to be removed otherwise you are going to get a lot of problems.

    I didnt create the table. I wonder, is it necessary to create global table? I dont have any idea (I've never create database or configure it manually. Everything was done by Wordpress).

    Have you specified the main database as the global database? You needed to have either created a global database as part of your set up, or specified that you would be using your existing single database as the global one as part of your multi-db set up.

    I just follow the installation guide. All I want to achive is having a network of blogs in single wordpress installation (Wordpress Multisite) & having those blogs distributed in 16 database. How to specify my existing single database as the global one?

  • Barry

    I didnt create the table.

    If you didn't create the table then it probably isn't there - so as I wrote above, you need to remove this line from your config file otherwise you will have problems.

    These instructions show you how to create a global database
    https://premium.wpmudev.org/project/multi-db/installation/

    If you created this database before you ran the move-blogs script then it should have your global tables in it already.

  • drixie

    The problem here lies not with yeffendi... but rather in the installation instructions. In many instances, it is ambiguous and in some places, I just guess on that I feel is the right step.

    On the issue of global table, here is what the instructions say:

    Line 25: Provide the same name you assigned for your global database in Step 2. example 'dbname_global'

    And this is what we have on line 25 (preceding comments included) in the code:

    //------------------------------------------------------------------------//
    //---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('nairapad_main_global');

    Global table and global database are two different things. The installation instructions do not even say anything about a global table.

    This issue should be resolved in due time.

    I also have a problem with username and passwords of the new databases as I indicated here: https://premium.wpmudev.org/forums/topic/multi-db-plugin-unclear-installation-instruction

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.