Is it possible to set-up MySql Replication to have one slave listening to two different masters?

link|improve this question
Belongs on dba.stackexchange.com – BryceAtNetwork23 Feb 3 at 14:15
@BryceAtNetwork23 First of all, is that really a good question worth migration? Second, if you're posting such a comment, please explain more than just "belongs on". If you think it should be migrated you need to flag it. Otherwise this encourages cross posting or other issues. – slhck Feb 3 at 14:57
I did flag it. The problem is, that dba.stackexchange.com is not an option from within the flag lightbox. So the best you can do, is flag it as "off topic" and make a quick comment about where it should go. Regardless of the quality, it doesn't belong here and there's no sense in writing a book about it. – BryceAtNetwork23 Feb 3 at 15:00
The OP has asked the same question on dba.stackexchange.com as well: dba.stackexchange.com/questions/12178/…. Probably time to close this one. – BryceAtNetwork23 Feb 3 at 15:07
@BryceAtNetwork23 next time, please use it needs ♦ moderator attention => Other and mention the migration to where over there. Thanks – Sathya Feb 3 at 15:27
show 1 more comment
feedback

closed as off topic by Sathya Feb 3 at 15:27

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

1 Answer

up vote 3 down vote accepted

In a relational DB there is always the ACID principle: http://en.wikipedia.org/wiki/ACID Atomicity, concistency, isolation and durability.

The problem with two masters is, how do you get consistency? If there are two masters with each their own records, one might alter a record and sync it to the slave. The other master might still expect the record to be the same as before the update of the other master. The result: inconsistent data, something you don't want in your MySQL database.

It might be possible with tricks, but I wouldn't do it myself. A NoSQL database might be an option?

link|improve this answer
The two masters will never be altering the same records. We have two sites each with its own db. We have another central location where we want the data of the other sites to be replicated to this single db. – Jonny Feb 3 at 13:04
stackoverflow.com/questions/7255590/… Have tried this? The following link from the post might help: mysqlonrails.blogspot.com/2008/03/custom-replication.html – Robert Feb 3 at 13:05
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.