WordPress.org

Ready to get started?Download WordPress

Forums

HyperDB with separate databases (1 post)

  1. chanchua2007
    Member
    Posted 2 years ago #

    Hello,

    I'm stuck with this, please help me :

    I have a Multiste with 500 blogs as subdomains. It's been slowing down and the number of tables in this is about 15000+ .

    I decided to separate this database into 10 databases and moveving the tables from the original databases accordingly. Then I used HyperDB for this model.

    It seams OK when I create new site and it create new tables in different databases. But the problem is when I open a blog, it can not find the right databases and cause "Error database connection". With some press of F5 button, it show the correct blog but back to error again.

    Anyone had faced this issue ? Please help me to solve it.

    I have config like this in the db-config.php file :


    $wpdb->add_database(array(
    'host' => 'xxx.127',
    'user' => 'wordpress',
    'password' => 'wordpress',
    'name' => 'wordpress_host3',
    'dataset' => 'global',
    'write' => 1,
    'read' => 0,
    ));

    $wpdb->add_database(array(
    'host' => 'xxx.127',
    'user' => 'wordpress',
    'password' => 'wordpress',
    'name' => 'wordpress_blog003',
    'dataset' => 'blog',
    'write' => 1,
    'read' => 0,
    ));

Topic Closed

This topic has been closed to new replies.

About this Topic