Help with install of Multi-DB

I've been trying to install Multi-DB and I'm not sure that I'm doing everything right so I'm wondering if I can find a professional here to employ to help with job.

I wasn't expecting the growth that we've had with our WordPress MU install and are in desperate need to have this done as our database is getting too large.

My setup is a little different then most.

WordPress MU 2.7
BuddPress 1.0b2
bbPress 1.0a (seperate database)
Simple:stuck_out_tongue:ress 4.0.1

only around ~450 blogs
18,000 users

would like to do atleast 16 databases which I already have set up.
If we can go from 16 to 256 in the future that would be the determining factor. If I cannot, then I will go with 256 dbs.

Website: http://www.wannanetwork.com

Any help would be appreciated.
Note: if this is in the wrong section, I apologize.

Thanks.
Dustin

  • maxaud

    I've tried it on a couple test databases and it transfers blogs just fine into the new databases but the blog gets this fatal error:

    Fatal Error
    If your blog does not display, please contact the owner of this site.

    If you are the owner of this site please check that MySQL is running properly and all tables are error free.

    Database Tables Missing.
    Database tables are missing. This means that MySQL is either not running, WPMU was not installed properly, or someone deleted wp_site. You really should look at your database now.

    What do I do now?
    Read the bug report page. Some of the guidelines there may help you figure out what went wrong.
    If you're still stuck with this message, then check that your database contains the following tables:
    wp_blogs
    wp_users
    wp_usermeta
    wp_site
    wp_sitemeta
    wp_sitecategories
    If you suspect a problem please report it to the support forums but you must include the information asked for in the WPMU bug reporting guidelines!

  • mafunk

    I wanted to use multi db and someone advised against it. They said,

    1. Multi-DB does not improve databases performance. ... it doesn't matter in you have 1 large database with many tables or several smaller databases with less tables.

    2. You can successfully run 10,000 blogs at 6,000 visits a day without multi-db

    3. Better than multidb is to use caching plugins for files and database, as well as server side accelerations solutions.

    Would you agree with this assessment?

  • Andrew

    Hiya,

    1. Multi-DB does not improve databases performance. ... it doesn't matter in you have 1 large database with many tables or several smaller databases with less tables.

    There is a performance benefit. Two additional benefits:
    1) It's easier to work with several smaller databases than one large one
    2) Once you're site gets fairly large you'll need to have multiple servers.

    It's also easier to get going with Multi-DB early on.

    2. You can successfully run 10,000 blogs at 6,000 visits a day without multi-db

    True. What happens when you get to 30, 40, 50K though? Again it's easier to get started early on.

    3. Better than multidb is to use caching plugins for files and database, as well as server side accelerations solutions.

    Why not all the above?

    Thanks,
    Andrew

  • maxaud

    here is my db-config.php:

    <?php
    //	Plugin Name: Multi-DB
    //	Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    //	Author: Andrew Billits (Incsub)
    //  Version: 2.7.0
    //------------------------------------------------------------------------//
    //---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('72.32.199.229.', '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('wpmu_new');
    add_global_table('blogs');
    add_global_table('users');
    add_global_table('usermeta');
    add_global_table('site');
    add_global_table('sitemeta');
    add_global_table('sitecategories');
    
    //------------------------------------------------------------------------//
    //---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');
    //	EX: add_db_server('global', 'dc1', 1, 1,'global.mysql.example.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser',  'globalpassword');
    
    $db_list['0']['db_name'] = 'wn_wpmu_main0';
    $db_list['0']['db_user'] = 'user';
    $db_list['0']['db_password'] = 'pass';
    $db_list['0']['db_host'] = 'localhost';
    
    $db_list['1']['db_name'] = 'wn_wpmu_main1';
    $db_list['1']['db_user'] = 'user';
    $db_list['1']['db_password'] = 'pass';
    $db_list['1']['db_host'] = 'localhost';
    
    $db_list['2']['db_name'] = 'wn_wpmu_main2';
    $db_list['2']['db_user'] = 'user';
    $db_list['2']['db_password'] = 'pass';
    $db_list['2']['db_host'] = 'localhost';
    
    $db_list['3']['db_name'] = 'wn_wpmu_main3';
    $db_list['3']['db_user'] = 'user';
    $db_list['3']['db_password'] = 'pass';
    $db_list['3']['db_host'] = 'localhost';
    
    $db_list['4']['db_name'] = 'wn_wpmu_main4';
    $db_list['4']['db_user'] = 'user';
    $db_list['4']['db_password'] = 'pass';
    $db_list['4']['db_host'] = 'localhost';
    
    $db_list['5']['db_name'] = 'wn_wpmu_main5';
    $db_list['5']['db_user'] = 'user';
    $db_list['5']['db_password'] = 'pass';
    $db_list['5']['db_host'] = 'localhost';
    
    $db_list['6']['db_name'] = 'wn_wpmu_main6';
    $db_list['6']['db_user'] = 'user';
    $db_list['6']['db_password'] = 'pass';
    $db_list['6']['db_host'] = 'localhost';
    
    $db_list['7']['db_name'] = 'wn_wpmu_main7';
    $db_list['7']['db_user'] = 'user';
    $db_list['7']['db_password'] = 'pass';
    $db_list['7']['db_host'] = 'localhost';
    
    $db_list['8']['db_name'] = 'wn_wpmu_main8';
    $db_list['8']['db_user'] = 'user';
    $db_list['8']['db_password'] = 'pass';
    $db_list['8']['db_host'] = 'localhost';
    
    $db_list['9']['db_name'] = 'wn_wpmu_main9';
    $db_list['9']['db_user'] = 'user';
    $db_list['9']['db_password'] = 'pass';
    $db_list['9']['db_host'] = 'localhost';
    
    $db_list['a']['db_name'] = 'wn_wpmu_maina';
    $db_list['a']['db_user'] = 'user';
    $db_list['a']['db_password'] = 'pass';
    $db_list['a']['db_host'] = 'localhost';
    
    $db_list['b']['db_name'] = 'wn_wpmu_mainb';
    $db_list['b']['db_user'] = 'user';
    $db_list['b']['db_password'] = 'pass';
    $db_list['b']['db_host'] = 'localhost';
    
    $db_list['c']['db_name'] = 'wn_wpmu_mainc';
    $db_list['c']['db_user'] = 'user';
    $db_list['c']['db_password'] = 'pass';
    $db_list['c']['db_host'] = 'localhost';
    
    $db_list['d']['db_name'] = 'wn_wpmu_maind';
    $db_list['d']['db_user'] = 'user';
    $db_list['d']['db_password'] = 'pass';
    $db_list['d']['db_host'] = 'localhost';
    
    $db_list['e']['db_name'] = 'wn_wpmu_maine';
    $db_list['e']['db_user'] = 'user';
    $db_list['e']['db_password'] = 'pass';
    $db_list['e']['db_host'] = 'localhost';
    
    $db_list['f']['db_name'] = 'wn_wpmu_mainf';
    $db_list['f']['db_user'] = 'user';
    $db_list['f']['db_password'] = 'pass';
    $db_list['f']['db_host'] = 'localhost';
    
    //
    //	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');
    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //	Usage: add_vip_blog(BLOG_ID, DS)
    //	EX: add_vip_blog(1, 'vip1');
    
    ?>

    none of the above listed databases are my main site's database.
    How should I insert my main sites database if it doesn't have a 0-9 or a-f ending. It has the same username and password as the rest though.

  • blogpeoria

    My problem is that I find the instructions lacking. Believe me, folks, I really do appreciate the hard work WP and WPMu developers do for the community. And I understand open source means there's no paid support. And I get that WPMu isn't for newbies. But I do wish the documentation on how to use something as complicated as the multi-db plugin didn't assume that the folks using sometimes aren't developers and need things spelled out.

    For example, what changes would I make to db-congig if I has WPMU installed on a database named "blog" and a username of "blog_user." I've got an idea, but I'm still not sure.

  • Andrew

    Hiya,

    No disrespect meant here. However, if you're running a WPMU site that needs to use the Multi-DB plugin then you need to have a good understanding of PHP and MySQL. You're basically running a service and people are trusting you with their content.

    For example, what changes would I make to db-congig if I has WPMU installed on a database named "blog" and a username of "blog_user." I've got an idea, but I'm still not sure.

    I'm afraid that's not enough information for us to help you. Are you installing Multi-DB for the first time or do you need to make changes to your existing config?

    Thanks,
    Andrew

  • blogpeoria

    Yeah, I get that a lot. I jumped into WPMu years ago not really realizing it I needed to no more about how databases work than I did. I didn't have any real problems with WP, so how could WPMu be much different? Besides, I was hot to use it to promote community-based citizen journalism.

    I've got 41 blogs, about half of which post updates regularly. Not much, but the site is slooooow. All I really want to do is make the load time quicker, the down-times far less frequent. I'm going to be moving the site to a more powerful VPS soon, but I want to make sure I'm doing all I can to make fix database issues. I have a database so huge, It's unmanageable. Hence, my desire to break it down into chucks.

    Anyway, right now, I'm just learning how to use the Multi-DB plugin before I try to install it on my "real" WPMu installation.

    I've got a "test" installation going at http://blogpeoria.org and I am wanting to use use the 16-database option as mentioned here:
    http://bavatuesdays.com/wpmu-multi-db-tutorial/

    what I have done so far is create some new databases.

    The original installation is found inside "blogpeor_bpo." I have since created:

    blogpeor_bpo0
    blogpeor_bpo1
    blogpeor_bpo2
    blogpeor_bpo3
    blogpeor_bpo4
    blogpeor_bpo5
    blogpeor_bpo6
    blogpeor_bpo7
    blogpeor_bpo8
    blogpeor_bpo9
    blogpeor_bpoa
    blogpeor_bpob
    blogpeor_bpoc
    blogpeor_bpod
    blogpeor_bpoe
    blogpeor_bpof

    all have a single user: "blogpeor_billy1" with all privileges. The IP address for this site is: 72.44.88.80

    I've stop fiddling with it now, mostly cause I'm a little frustrated at the "clear-only-if-known" instructions I am finding so far.

    I'm not being critical, but I am hoping I can get a little direction.

    Thanks.

  • siddheshj

    Hi Andrew,

    I referred to a lot of topics on this forum. There is repeated mention of how MultiDB can help when we have to move to multiple servers.

    However, this topic shows that there isn't scalability built for accessing multiDB across multiple servers.

    https://premium.wpmudev.org/forums/topic/multidb-not-accessing-multiple-servers#post-3982

    I am trying to install a 4096 database variation of MultiDB with 2 servers ( which will eventually scale to n servers)

    Has there been any further update on this front? At one point we can clearly see the utility of having so many databases, but multidb can truly scale only if it can access multiple servers. If this isn't working, there is discrepancy between what the plugin promises and what its currently delivering.

    Any help in this matter would be appreciated.

    Siddhesh
    PS: At my end, I am trying to modify db.php too, but haven't been successful yet.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.