I have the same db on master and slave and I want to use replicate-rewrite-db to change the replicating name of this db on the slave.
Slave my.cnf: ----------------------------------- [mysqld] datadir=/var/lib/mysql socket=/tmp/mysql.sock master-host=master.company.com master-user=repl master-password=******** master-port=3306 server-id=2 replicate-rewrite-db=mydb->slave_mydb skip-innodb [client] socket=/tmp/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid Master my.cnf --------------------------------------- [mysqld] log-bin server-id=1 socket=/tmp/mysql.sock [client] socket=/tmp/mysql.sock [mysql.server] user=mysql basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid The slave seems to ignore replicate-rewrite-db option and tries to create an already existing db (as I said, same db names on master and slave), so I get an ERROR 1007: Can't create database 'mydb'. Database exists I put the replicate-rewrite-db option AFTER creating mydb on master, so the bin log already contains this action. Can this be the problem? Thanks, Arthur --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php