Search This Blog

Thursday, December 2, 2010

Mysql Replication - From one database on master to another database on slave

Mysql Replication - From one database on master to another database on slave


Tells the slave to translate the default database (that is, the one selected by USE) to to_name if it wasfrom_name on the master. Only statements involving tables are affected (not statements such as CREATE DATABASEDROP DATABASE, and ALTER DATABASE), and only if from_name is the default database on the master. This does not work for cross-database updates. To specify multiple rewrites, use this option multiple times. The server uses the first one with a from_name value that matches. The database name translation is done before the --replicate-* rules are tested.
If you use this option on the command line and the “>” character is special to your command interpreter, quote the option value. For example:
shell> mysqld --replicate-rewrite-db="olddb->newdb"

TO READ THE ORIGINAL ARTICLE AT dev.mysql.com, Click Here

No comments:

Post a Comment