Questions regarding the multi-db plugin

Hi all,

I have few questions regarding the multi-db plugin which I hope someone can please help me with them:

The installation manual wrote: There is one other table you'll need to create (2 if you intend to  provide a VIP database).  To create these tables you'll just want to  copy one of the lines generated from the database tool and use the same  root database name with additional tags of "global"  (and vip1, vip2,  etc if needed).  So you're final output for this line will look  something like this:
CREATE DATABASE dbname_global DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

1. As far as I understand VIP databases, are created for the purpose that if and only if we found a blog with a lot of traffic, then we can move this blog to the VIP database….which then could be re-allocated on a separate server….but then I saw you writing:
"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."
So I am pretty confused about the VIP database and why shall we use them? and how can we benefit from the multi-db plugin if we found that there is a blog that have a huge traffic on it?

2. I don't think I understood the purpose of the Global database here? So can someone please explain to me the purpose of the Global database? and…
2.A. Is it only one database or there can be more than one globlal database?
2.B. What's the relation between this database and plugins? Actually will I need to re-setup / re-adjust any installed plugins after finishing the setup of the multi-db plugin?

3. In move-blogs.php, I don't think I understand the main purpose of newdb_prefix field? I mean what exactly shall I enter there?

Thanks in advance for your time

  • Barry

    So I am pretty confused about the VIP database and why shall we use them

    You pasted the answer directly above the question:
    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.

    i.e. You should use them if you get a site/blog that gets a lot of traffic as it allows you to place the database for their site/blog on a separate physical server.

    2. I don't think I understood the purpose of the Global database here? So can someone please explain to me the purpose of the Global database? and…

    The global database holds your global tables - i.e. wp_blogs, wp_sites, wp_users - the ones that are used across the entire system (global).

    2.A. Is it only one database or there can be more than one globlal database?

    See answer above - there would never be a reason for you to have two global databases

    2.B. What's the relation between this database and plugins? Actually will I need to re-setup / re-adjust any installed plugins after finishing the setup of the multi-db plugin?

    None - multi-db provides a data abstraction layer to WP - correctly coded (wp standards) plugins won't even know it is there.

    3. In move-blogs.php, I don't think I understand the main purpose of newdb_prefix field? I mean what exactly shall I enter there?

    When you have a single database it has a single name (e.g. mydb). multi-db is reliant on databases having specific names e.g. db_0, db_1, db_2 - in those cases the newprefix (for your new databases) is db_

  • bpilot

    Hi Barry,

    Thanks a lot for your reply, truly appreciated. One last question, you said:

    i.e. You should use them if you get a site/blog that gets a lot of traffic as it allows you to place the database for their site/blog on a separate physical server.

    So the steps to take in case I will have a blog with massive traffic are:

    A. Create a VIP database
    B. Move the high traffic blog database to the newly created VIP database
    C. Move the newly created VIP database physically to another server

    correct?

  • Barry

    Almost :slight_smile: If you are going to put it on another server then assuming you have another db server

    1. If the new server is on a new IP range then you need to add a new datacenter (add_dc_ip) first.
    2. You would then add a new server to the db-config.php (add_db_server to tell the plugin about the new server).
    2. Create a VIP db on that server.
    3. Back up and move the blog in question to that new db on the new server
    4. Tell the multi-db to look for that blog in a specific location (add_vip_blog)

    And then it should look for the blogs details in the new db on the new server from that point onwards.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.