I have two MySQL 5.5 servers in a master/slave replication setup. The server hosts about 10,000 databases, but the replication is messed up for only a couple of databases.
To fix the replication I could do a complete resynchronization by copying all the databases over to the slave server, but there are many databases and so much data that this would entail a long downtime for all the databases.
A better solution would be to re-synchronize just the two or three databases whose replication is broken. Can I do this in such a way that the only downtime would be for those two or three databases that have replication problems?
Best Answer
It depends a bit on your setup, there are different ways to archive what you want. I will describe a very basic one which only uses MySQL tools (and some standart Linux tools).
First of all you have to make sure a few things:
Now the procedure:
mysql.db
table.Keep in mind that there are different approaches for restoring failed slave databases, above is one of them, so maybe some additional research would be a good idea. If you have questions to particular points of my description donĀ“t hesitate to ask, I will then edit my answer.