Couple questions, and please let me know is this how you install multidb?

1) The updated multidb 2.7.5-Beta compatible with 2.7.1 wordpress mu? Can I use this on production site?

2) Anyone got a list of default table on the top of the head to give it to me so I can exclude from the multidb installation?

3) add_db_server('0', 'dc1', 1, 1,'64.120.23.72','192.168.0.101', 'wpmu_0', 'db_user_name', 'db_user_name_pass'); --------- the very first part inside the open parentheses where it's '0' (and '1', '2', and so on...), I look that up in db.php, and see it's acting as a sequential scheme right? Since creating a database, it be like wpmu_0, wpmu_1, and so on, but never like just 0 or 1. My question is that '0' and sequential numbers/letters that follow in each add_db_server is not important or how important to what extent? What can go wrong here? Or should I say I don't have to create that number through any kind of software right, but just creating it by entering correct sequence inside add_db_server function so the function can relate that to its multidb logic? My guess is that DS which is '0' and so on stands for Data Sequence?

4) Why multidb needs add_db_server('global'...)? Global is for global tables + default global tables from wordpress mu? Also it's housing the very first blog (admin's blog) right?

5) add_db_server('vip1'...) is a function to allow adding a single blog inside each database right? Or it's basically acting the same as just any other add_db_server function? My guess it's the same, but correct me if I'm wrong, it is there to remind us that we can use add_db_server function to allow a single busy blog to be on its own database, right? So to continue on I can do add_db_server('vip2'...), ('vip3), and so on right? Then all I have to do is to move that specific blog's ID, all of its related tables to add_db_server('vip[n]') right? This can be done even we already installed multidb?

6) Anyone know how to disable the wpmu site to not allow edit, add, but only allow to read, while installing multidb?

7) Here is how I plan to install multidb, please correct me if you see something is wrong.
a) First, I do a backup of original db using mysqldump, then create a single new db to house the original db using mysql import.
b) Create 4096 db using command lines emit by http://db-tools.wpmudev.org/db_sql.php - result looks like http://pastie.org/534092. Enter that into mysql console, etc...
c) Create a single mysql user that will handle this 4096 multidb databases.
d) Add add_db_server('global') first into db-config.php.
e) Use http://db-tools.wpmudev.org/db_servers.php to generate huge list of add_db_server -- result may look like this http://pastie.org/534094. Add those lines into db-config.php.
e) Tweak other db-config.php settings.
f) I don't have to add add_db_server('vip1'...) right? This is optional right? Plus I can add this in later into db-config (after installation) when the need arises for vip blog right? So I omit this part completely.
g) Double check db-config.php settings.
h) Then move the db.php and db-config.php into /wp-content.
i) Create a new directory called scripts
j) Move move-blogs.php into directory /wp-content/scripts/
k) Move the whole wordpress-mu directory that is live to a new name such as the command "mv my-wordpress-mu new-wordpress-mu"
l) Open up a browser and go to url of yourwebsite.tld/new-wordpress-mu/wp-content/script/move-blogs.php
m) I guess follow the instruction on the move-blogs.php should be suffice, and wait until the moving older blogs from older db to multidb that I have created get finish right?
n) Afterward move "mv new-wordpress-mu my-wordpress-mu"
o) Test to see if sign up a new blog is OK, adding new post a new blog, edit new blog, etc...
p) Test to see sign in with an older account is working or not, and edit, add, delete posts from an older account.
q) Test all the plugins to see if the plugins will work with multidb installation.
r) Done right?

Now updating new version of multidb + new version of wordpress mu (these two gotta be done at the same time right?) is another whole story, and I don't know how to approach this just yet.

Please let me know if my process of going about to install multidb is the correct way, and if you see anything wrong in the multidb installation process that I wrote above, don't hesitate to fix me up. Thank you.

  • drmike

    6 - search mu forums shutdown plugin. Best bet would be just shutdown. Or stick in a temporary index.html file in root where mu installed. Doesn't take long to install. Best bet down or folks want to leave comments. PR - "making better experience and allowing expansion in future" promote down as less downtime in future.

    Why mu in subdirectory? Best in root of domain where blogs served off of. Else problems. Search mu forums "installed in subdirectory" fir headaches.

  • Andrew

    Hiya,

    Apologies for the delay on this one. You had a ton of questions so I had to find some time to answer them all.

    1) The updated multidb 2.7.5-Beta compatible with 2.7.1 wordpress mu?

    Yep, it's compatible.

    Can I use this on production site?

    No one has reported any issue so I'd say it's safe. If you're not using BuddyPress though I'd just use the previous version to be safe.

    2) Anyone got a list of default table on the top of the head to give it to me so I can exclude from the multidb installation?

    Afraid not. All of the WPMU and BuddyPress tables are pre-configured in Multi-DB 2.7.5. You just need to add plugin tables. Each of our premium plugins include a sql.txt file.

    When adding global tables be sure to leave off the prefix (Ex: 'wp_').

    My question is that '0' and sequential numbers/letters that follow in each add_db_server is not important or how important to what extent?

    That bit in each add_db_server line is quite important. They characters of an md5 hash (1 character for 16 DBs, 2 for 256 DBs and 3 for 4096).

    Your db names don't *have* to include those characters but it's highly recommended. Just pick a prefix like 'cats_' and create databases with the prefix followed by the has character. Ex:

    cats_0
    cats_1
    cats_2
    etc

    This tool might help:
    http://db-tools.wpmudev.org/db_sql.php

    Why multidb needs add_db_server('global'...)?

    It's required so multi-db knows which db to send global table queries.

    Global is for global tables + default global tables from wordpress mu?

    Correct. Your global table (ex: 'cats_global') will hold all global tables.

    Also it's housing the very first blog (admin's blog) right?

    Incorrect. Your main blog will either be in c, c4 or c4c (cats_c, cats_c4, cats_c4c) depending on the number of databases you'll be using.

    5) add_db_server('vip1'...) is a function to allow adding a single blog inside each database right?

    That allows you to place a blog in a specific database. Unless you have a blog that gets a ton of traffic then it's not really worth it to bother with that feature.

    it is there to remind us that we can use add_db_server function to allow a single busy blog to be on its own database, right?

    Correct.

    So to continue on I can do add_db_server('vip2'...), ('vip3), and so on right?

    Yep.

    Then all I have to do is to move that specific blog's ID, all of its related tables to add_db_server('vip[n]') right?

    Correct. The add_vip_blog() function is used to assign a blog to a specific db.

    This can be done even we already installed multidb?

    Yep.

    Anyone know how to disable the wpmu site to not allow edit, add, but only allow to read, while installing multidb?

    It's usually easiest to just rename index.php and upload a custom one that mentions the site is down for maintenance, etc.

    a) First, I do a backup of original db using mysqldump, then create a single new db to house the original db using mysql import.

    Make a backup and leave the original db where it is.

    b) Create 4096 db using command lines emit by http://db-tools.wpmudev.org/db_sql.php - result looks like http://pastie.org/534092. Enter that into mysql console, etc...

    It would be 4096 blog databases and one global (ex: cats_global).

    Unless you plan on having hundreds of thousands of blogs I wouldn't use 4096 databases though. I'd go with 256 max.

    c) Create a single mysql user that will handle this 4096 multidb databases

    That's the easiest way.

    d) Add add_db_server('global') first into db-config.php.

    Yep. Be sure to use the example files for reference.

    e) Use http://db-tools.wpmudev.org/db_servers.php to generate huge list of add_db_server -- result may look like this http://pastie.org/534094. Add those lines into db-config.php.

    Correct. I would use 'localhost' for both the local and remote connection if MySQL is on the same box as your webserver.

    e) Tweak other db-config.php settings.

    Yep.

    f) I don't have to add add_db_server('vip1'...) right? This is optional right?

    Correct. That's entirely optional.

    g) Double check db-config.php settings.

    Triple check as well. 99% of the people who post here with a multi-db problem just overlooking something in db-config.php.

    h) Then move the db.php and db-config.php into /wp-content.

    Yep

    i) Create a new directory called scripts

    You can place those files wherever you want. I just place mine in that directory so that's why it's in the instructions.

    j) Move move-blogs.php into directory /wp-content/scripts/

    Don't forget to edit the file before uploading it. There are several settings you need to configure at the top of the file.

    k) Move the whole wordpress-mu directory that is live to a new name such as the command "mv my-wordpress-mu new-wordpress-mu"

    No need to move WPMU anywhere.

    l) Open up a browser and go to url of yourwebsite.tld/new-wordpress-mu/wp-content/script/move-blogs.php

    yep, open up the file in your browser. However, there's no need to move WPMU.

    m) I guess follow the instruction on the move-blogs.php should be suffice, and wait until the moving older blogs from older db to multidb that I have created get finish right?

    Yep. If you see any errors at the top of the page just ignore them.

    n) Afterward move "mv new-wordpress-mu my-wordpress-mu"

    Again, no need to move WPMU. Did you see this mentioned somewhere?

    o) Test to see if sign up a new blog is OK, adding new post a new blog, edit new blog, etc...

    Yep.

    p) Test to see sign in with an older account is working or not, and edit, add, delete posts from an older account.

    Ditto.

    q) Test all the plugins to see if the plugins will work with multidb installation.

    Yep. If you have plugins already installed then be sure to add any global tables to db-config.php prior to uploading it *and* be sure all of the plugin tables were copied to your global db after running move-blogs.php.

    r) Done right?

    Pretty much.

    Now updating new version of multidb + new version of wordpress mu (these two gotta be done at the same time right?) is another whole story, and I don't know how to approach this just yet.

    We always release a new version of Multi-DB when new versions of WPMU are released.

    Thanks,
    Andrew

  • VentureMaker

    Hello, guys

    I'm around again after quite a while of absence :slight_smile:

    OK, I saw one interesting thing in this topic.
    From what I understood, there's no limit for the amount of those 'vip' databases that allows to move definite blog into a separate DB, right?

    In other words, I can do either 16 or 256 or 4096 install, but at the same time I can have *any* amount (even 10000) of 'vip' databases (kinda vip1... - ...vip10000) and move 10000 blogs each to its 'personal' DB.
    Do I get this right?

    Basically, what I'm trying to do is to modify multi-db plugin and make it use a separate DB for every blog created in WPMU. Of course, fully automated, I mean no manual creation of DBs and no manual moving of tables to a 'dedicated' DB.

    BTW, what do you guys think - is my concept '1 blog - 1 DB' useful/valuable/needed?

  • VentureMaker

    Correct if I'll use only 1 server for all those databases :slight_smile:

    But MultiDB allows to locate DBs on different servers (physical or virtual).

    More of that, an interface in WPMU backend that will allow site admin to selectively move definite blog(s) to 'dedicated' DBs will do only good - site admin can move only most loaded/active blogs.

    BTW, the same thing for files will also help - ability to move files of most active/loaded blogs to NAS'es or file/web servers.

  • VentureMaker

    Andrew,

    Definitely, we won't be allowing a separate DB for each and every blog.
    First we thought we'll give this feature to Supporter's blogs only.
    But thinking more led us to creating a site admin interface that will allow site admin to click a button and move a definite blog(s) to a separate DB.

    In our case the reason for this is quite simple - on many installs we have *very* active and *very* large blogs. Sometimes 3-4 such blogs cause the same load as 300-400 other blogs (not so large and active).
    So, it turns out to be reasonable to be able to move such blogs to separate DBs on separate physical/virtual servers.

    Next step would be a tool to move web stuff across separate servers - files related to 'heavy' blogs, maybe plugins too.
    Even load balancing to core WPMU/BP/bbPress files across several web servers :slight_smile:

  • siterocker

    Hiya folks, I'm new here at WPMUDev. One of the reasons why I became a premium member is to be able to see and install multi-DB plugin. A few of my WPMU/BP sites are growing steadily.

    But after looking at the steps - it scares me. LOL.

    I'm not techie so please bear with me. Got this first '2' questions though I hope this is relevant to this thread:

    1. Is it possible to install WPMU on a separate hosting account and the 16 or 4096 databases on another account?. Let's say that the server where wpmu is installed is not using cPanel, and the other server I plan to put the DB's is using Cpanel.

    2. What is meant by this?
    add_db_server('0', 'dc1', 1, 1,'remotehost','localhost', 'bloggnet_0', 'user', 'password');
    add_db_server('1', 'dc1', 1, 1,'remotehost','localhost', 'bloggnet_1', 'user', 'password');

    : dc1 - is mapped to an IP (is this the IP of my hosting? Can I also use dc2 mapped to the IP of the other server/host?

    : remotehost - is the value equal to my host's mysql location (ex. myaccount.hostmysql.com or simply 'localhost' for a hosting with cPanel?

    : localhost - can I set this to any value? like 127.1.1.1

    Hope I can be enlightened on this - my first step before going into multi-DB.

    Thanks.

  • siterocker

    Hiya folks, I'm new here at WPMUDev. One of the reasons why I became a premium member is to be able to see and install multi-DB plugin. A few of my WPMU/BP sites are growing steadily.

    But after looking at the steps - it scares me. LOL.

    I'm not techie so please bear with me. Got this first '2' questions though I hope this is relevant to this thread:

    1. Is it possible to install WPMU on a separate hosting account and the 16 or 4096 databases on another account?. Let's say that the server where wpmu is installed is not using cPanel, and the other server I plan to put the DB's is using Cpanel.

    2. What is meant by this?
    add_db_server('0', 'dc1', 1, 1,'remotehost','localhost', 'bloggnet_0', 'user', 'password');
    add_db_server('1', 'dc1', 1, 1,'remotehost','localhost', 'bloggnet_1', 'user', 'password');

    : dc1 - is mapped to an IP (is this the IP of my hosting? Can I also use dc2 mapped to the IP of the other server/host?

    : remotehost - is the value equal to my host's mysql location (ex. myaccount.hostmysql.com or simply 'localhost' for a hosting with cPanel?

    : localhost - can I set this to any value? like 127.1.1.1

    Hope I can be enlightened on this - my first step before going into multi-DB.

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.