Multi-DB Installation & Mechanism

Dear Support,

I am wordpress newbie :slight_smile:. I have tried to install the Multi-DB plugin as mentioned in the document but it doesn't work on my test site, localhost.

Environment: wordpress MU 3.5.1
I can create new 16dbs and move the sites correctly according to move-blogs.php is work. However, after I put db.php and db-config.php on wp-content folder. My wordpress main page, "/localhost/wordpress" , can't not be loaded, error "Error establishing a database connection"

I have some questions about the plugin:
1. Should I install this plugin on \wp-content\plugins instead of wp-content?
2. After I move the site to other db, Do I need to delete all old wp tables on old database?
3. Do I have to call move-blogs.php everytime I've created new site?

Best Regards,
Kan

  • Ciprian Gherghescu
    • The Incredible Code Injector

    @veerawit_dechudomwat

    Hi and thank you for being a member of our community.

    There was a previous question asked by a member of our community which got resolved with this answer:

    That error means your MySQL username, password, db name, or host setting is wrong. Make sure that the MySQL username exists and that the password is correct. Also make sure the database exists and the name is correct.

    If you are 100% sure everything is correct then it's best to contact your host.

    https://premium.wpmudev.org/forums/topic/installation-problems-error-establishing-a-database-connection

    Can you check if you have followed all the steps described here?

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

    Warmest regards

  • veerawit_dechudomwat
    • Flash Drive

    Dear Support,

    I have already defined the configuration of db.php, db-config.php and move-blogs.php and put it in the right places that mentioned in the usage doc. It seems move-blogs can copy wp_ table from main db, "demo", to my other demos, "demo_c". however, the new post on my subsite (wp_2) haven't been moved to demo_c db automatically. The new post still be kept in demo db (old one). I still don't understand how does it work? Could you please explain the mechanism of this plugin in detail?

    Best Regards,
    Kan

  • veerawit_dechudomwat
    • Flash Drive

    Dear Support,

    I have found an error while moving blogs script is called. I have attached the screen below. Here is the first error.
    After I run the command follow by the link in "To start the copy process click here" I've got an error again. Here is the second error.

    Please help me investigate the problems.

    Best Regards,
    Kan

  • veerawit_dechudomwat
    • Flash Drive

    Dear Support,

    According to I try changing my main site to demo_global instead of demo. I found that the db.php and db-config.php can spread my posts over the new databases correctly. The result seems correct. Please confirm my experiment whether it's the right way to use this plugin or not. This way is not mentioned in the usage document. and I still wait for your reply on the warning message and those questions above.

    Best Regards,
    Kan

  • Jack Kitterhing
    • Code Norris

    Hi there Kan (@veerawit_dechudomwat)

    I hope you are well today, yes that is correct your main site would be the global table, then the posts from your sub sites will go throughout how many databases you have defined, you can also create a VIP database(s) which means that the blog/a blog/site will have one database just for them :slight_smile:

    Thank you for being a WPMU DEV member and have a great weekend!

    Kind Regards
    Jack.

  • Barry
    • DEV MAN’s Mascot

    According to I try changing my main site to demo_global instead of demo. I found that the db.php and db-config.php can spread my posts over the new databases correctly. The result seems correct.

    Yes your main global table should be called x_global to differentiate it from the old single db install.

    and I still wait for your reply on the warning message and those questions above.

    If move-blogs has moved your blogs ok, then ignore any errors

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.