Multiple master replication to single slave in Mys

2019-06-01 01:45发布

问题:

I am having trouble in my database design. I would like to accomplish all the instances below:

1.) Multi-Master and Single Slave.

2.) Rename database in slave.(Server1 and Server has diff datasets)

]1

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.

I am using ubuntu, nginx and mysql. How can i accomplish this design?

回答1:

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.