Support » Plugin: HyperDB » Buddypress + HyperDB

  • Victor

    (@virre131)


    I’m trying to move all Buddypress tables into an ‘Buddypress’ database. I want to give Buddypress its own database.

    But it does not work properly.
    I get some errors

    <strong>Undefined variable: server
    Undefined index: bpress__r
    Undefined index: bpress__w</strong>

    My current config
    db-config.php:

    // Buddypress
    $wpdb->add_database(array(
        'host'     => DB_HOST,     // If port is other than 3306, use host:port.
        'user'     => DB_USER,
        'password' => DB_PASSWORD,
        'name'     => 'social',
        'dataset'  => 'bpress',
        'write'    => 1,
    ));
    
    [ ... ]
    
    elseif ( preg_match("/bp_/", $wpdb->table) ){
            return 'bpress';
    }

    This config have worked for the other tables before. Does Buddypress support HyperDB. I have tried searching for a solution, but whitout success.

    Have anyone got this working? Witch db-config should I use to get this working?

    • This topic was modified 2 years ago by  Victor.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Me too. The same problem!

    I fixed my problem

    I had created the new mysql database but forgot to grant access to the mysql user used by wordpress.
    So I granted the premissions for the mysql user used by wordpress to the database for buddypress. And after that it worked for me.

    Victor

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Buddypress + HyperDB’ is closed to new replies.