On Fri, Apr 4, 2008 at 6:30 AM, Shanmugam, Dhandapani < [EMAIL PROTECTED]> wrote:
Hi, Hi, > > Any idea wat replicate-rewrite-db does with example.. > > > > It takes statements for one database, and rewrites them into another. An example of the syntax would be this line in the my.cnf file of your slave: replicate-rewrite-db="master_db->master_db_foo" Any statement on master_db would be replicated to the slave, but then executed on master_db_foo. So, for example: You execute 'update table1 set foo=4 where bar=2;' on the master_db on your replication master. The statement would get replicated down to the replication slave. When the slave is evaluating your replication rules, it will see that the statement should be rewritten to apply to the master_db_foo. Then 'update table1 set foo=4 where bar=2;' is executed on master_db_foo. Hope that helps, Dan