简体   繁体   English

如何将不同的表复制到Mysql中的不同数据库?

[英]How to replicate different tables to different databases in Mysql?

I have Database1 on server1 and Database2 , Database3 on server2 . 我在server1 Database2 ,在server2上有Database1Database3 Database1 has two tables T1 , T2 . Database1具有两个表T1T2 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: 限制在复制Database2T1Database3T2 ,使用--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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM