[英]How to replicate different tables to different databases in Mysql?
I have Database1
on server1
and Database2
, Database3
on server2
. 我在
server1
Database2
,在server2
上有Database1
, Database3
。 Database1
has two tables T1
, T2
. Database1
具有两个表T1
, T2
。 I want to replicate T1 on Database2
and T2 on Database3
. 我想复制
T1 on Database2
T2 on Database3
T1 on Database2
T2 on Database3
。
How can I accomplish it? 我该怎么做?
I googled but only found examples where replication was performed to only one DB. 我用谷歌搜索,但只发现了仅对一个数据库执行复制的示例。
Restrict the replication on Database2
to only T1
and on Database3
to only T2
, using the --replicate-do-table=name
option: 限制在复制
Database2
仅T1
和Database3
只T2
,使用--replicate-do-table=name
选项:
http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_replicate-do-table http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_replicate-do-table
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.