I need some info about Multi DB

For vip databeses do I have to make other db than the 256 db?
Like this?
CREATE DATABASE private_lm_vip1 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE DATABASE private_lm_vip2 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

And then i put the 256 dbs?

And then?
add_db_server('vip1', 'dc1', 1, 1,'remotehost','localhost', 'dbname_global', 'dbuser', 'dbpass');
add_db_server('vip2', 'dc1', 1, 1,'remotehost','localhost', 'dbname_global', 'dbuser', 'dbpass');
After this the 256 dbs...

  • Michelle Shull

    Hi, Andu-Marian!

    First, let's double check to make sure VIP databases are required for your installation. From the usage guide, it looks like most users don't need to bother with this step at all.

    A note about VIP databases: These allow you to place a blog in a specific database. Unless you have a blog/site that gets a ton of traffic and you want to put it on another physical server for performance reasons, then it’s not really worth it to bother with that feature. Again, the vast majority of installs do not need to use VIP blogs, so skip over it unless you are sure you need to use this feature. Each VIP blog/site will need it’s own database which is why you’d use vip1, vip2, etc. You’ll use the add_vip_blog() function in db-config.php to move specific blogs to these databases.

    Do you have a site with very high traffic that needs to use its own database? Very high traffic would be in the millions of hits per day/week range.

    If you do need this step, yes, you'll need to create your VIP databases separate from your 256 databases, as well as your global database, with the first steps, then create your 256 databases through command line or PHPMyAdmin.

    https://premium.wpmudev.org/project/multi-db/#usage

    We strongly advise users to make triple-sure they need VIP databases, because if you can avoid that step, it makes the process much, much simpler, and VIP databases aren't needed that often.

    Hope this is helpful!

  • Andu-Marian

    On add global table in db-config.php I have to add all tables from my database?
    This are from de file:
    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');

    OOO... Line 25: Provide the same name you assigned for your global database in Step 2. example ‘dbname_global’ I don't find where to change this... Only global tables I see

  • Michelle Shull

    Hello again, Andu-Marian.

    First, make sure you're using our tool: https://premium.wpmudev.org/db-tools/db_sql.php

    Step 1: Create the command to create your 256 databases with our tool.
    Step 2: Copy one of those queries and use it as the base to make your global DB, which will look something, but perhaps not exactly, like this:

    CREATE DATABASEdbname_globalDEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    Step 3: Now copy do the same thing for each of your VIP databases. One line each.

    Step 4: Login to PHP MyAdmin and use the instructions generated by our tool to add all of the new databases to your MySQL.

    Step 5: db-config.php

    Now that are databases are created and in place, it’s time to start configuring the plugin to handle the heavy lifting. We’ve got 5 separate areas to configure here (6 if you’re using VIP databases)

    Line 10: Change the DB_SCALING to however many databases you’re using (16, 256, or 4096)
    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’

    Step 6, go back to our tool: https://premium.wpmudev.org/db-tools/db_servers.php

    Fill in your DB Name: (same as in step 2), Your DB Username and Password, For DB Local Host enter you server IP again. If you’re using a Remote Host enter that here, if you’re not just leave it blank. Finally select the number of databases you created and click “Submit”.

    Your output should look similar to the following:

    add_db_server('0', 'dc1', 1, 1,'remotehost','localhost', 'dbname_0', 'dbuser', 'dbpass');

    The actual values will be the ones you entered. If you did not enter anything for the remote host, that value will simply be empty.

    Then: You’ll want to copy and past these lines directly above the commented out “VIP Blogs” section.

    Finally, we’ll add the line for our global database, directly above the lines you just pasted. Assuming you used “global” for your global database, this line will look the same as the others we generated. Following the pattern here it’ll look similar to this (again, with the values you entered):

    add_db_server('global', 'dc1', 1, 1,'remotehost','localhost', 'dbname_global', 'dbuser', 'dbpass');

    For VIP Databases: To add a blog/site to your VIP database simply follow the example given at the very bottom of the file. To add your blog ID of ’1? to the vip1 database just enter

    add_vip_blog(1, 'vip1');

    Create a new line for each of the VIP databases you need. Paste them all in directly above the ‘?>’ which closes the file.

    Hope this helps!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.