I followed the instruction on page http://drupal.org/node/view/2622#advanced
2 drupal installations:
master_db=drupal-pca120
slave_db=drupal-pca1
conf.php of the slave:
$db_url = "mysql://mysqluser:password@localhost/drupal-pca1";
# If $db_prefix is specified all database table names will be
# prepended with this string. Be sure to use valid database
# characters only, usually alphanumeric and underscore. If no
# prefixes are desired, set to empty string "".
$db_prefix = array(
"default" => "drupal-pca1.",
"users" => "drupal-pca120.",
"sessions" => "drupal-pca120.",
"role" => "drupal-pca120.",
"authmap" => "drupal-pca120."
);
conf.php of th master:
db_url = "mysql://mysqluser:412me@localhost/drupal-pca120";
# If $db_prefix is specified all database table names will be
# prepended with this string. Be sure to use valid database
# characters only, usually alphanumeric and underscore. If no
# prefixes are desired, set to empty string "".
$db_prefix = "";
If I go to the slave-site I get this Error:
Fatal error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-pca120.users u INNER JOIN drupal-pca120.sessions s ON u.uid = query: SELECT u.*, s.* FROM drupal-pca120.users u INNER JOIN drupal-pca120.sessions s ON u.uid = s.uid WHERE s.sid = '0977edb2a9f61d735e685c81da9ff13b' AND u.status < 3 LIMIT 0, 1 in /usr/local/www/PCA/html/includes/database.mysql.inc on line 100