在MySQL中将多个主复制到单个从 [英] Multiple master replication to single slave in Mysql
问题描述
我在数据库设计中遇到麻烦.我想完成以下所有实例:
I am having trouble in my database design. I would like to accomplish all the instances below:
1.)多主从和单从.
1.) Multi-Master and Single Slave.
2.)重命名从服务器中的数据库.(服务器1和服务器具有差异数据集)
2.) Rename database in slave.(Server1 and Server has diff datasets)
] 当前,我可以按每个从属1个主控复制数据库.但是我无法按照我想要的方式进行操作(就像上面的图片一样).我在mysql 5.7中读到了多源复制,但是它说不建议在生产中使用.而且我不认为那是我想要的.
Currently i can replicate database by 1 master per slave. But i can't do it the way i want it (Just like the above picture). I read about Multi-source replication in mysql 5.7 but it says that it is not advisable for production. And i don't think that was i'm looking for.
我正在使用ubuntu,nginx和mysql.我如何完成此设计?
I am using ubuntu, nginx and mysql. How can i accomplish this design?
推荐答案
不进行锻炼的主要原因是 CHANGE MASTER 命令.
这仅允许您将一个Master设置为阅读源
The Main reason why this not workout is CHANGE MASTER command.
This only allows you to set one Master as a source to read
此处是为什么不成功的完整说明.
here is the full explation of why its not succesfull.
这篇关于在MySQL中将多个主复制到单个从的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!