MySQL Forums
Forum List  »  Docs

Re: Multi master to single slave replication
Posted by: Tom Krouper
Date: June 30, 2008 10:12AM

The only way I've found to do this is to create a convoluted script to
1. Stop replication on the slave.
2. Record the master's file and pos from show slave status.
3. Do a change master to the "other" master.
4. Let it catch up for a set time.
5. repeat.

There are many issues with this solution. The first being if you don't catch up by the set time in step 4 you end up having to verify that the exec and read pos in the show slave status command match or that you get the right one. Also if replication does get messed up you have to go through the error logs to find out where you need to catch up from which can be a huge pain if you are changing masters a lot.

I only did this in a situation where we were updating two entirely different databases. I turned on the %ignore_db stuff to avoid messing up mysql.%.

It has many issues and I'd love a better solution. If you find one, please let me know.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Multi master to single slave replication
4609
June 30, 2008 10:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.