- MySQL知识库 :: myisam
- Replication went out of sync how do I restore?
-
Discussion
If you have all MyISAM tables and a small amount of data, you may find that a simple LOAD DATA FROM MASTER command is the easiest way to set up the slave again.
If only minor differences exist between the slave and the master, and you know exactly what they are, then you may simple perform the needed UPDATE, INSERT, and DELETE statements on the slave in order to make it conform to the master's data. Then you can tell the slave to continue replication. You may need to instruct the slave to skip some number of statements coming from the master, if you have manually run them while updating the slaves data.
Otherwise, you will need to set the slave up from scratch again. Simply follow the instructions for setting up replication on a new server. If you have another slave which is in sync with the master, you may prefer to copy data from the good slave to the bad one, to avoid interrupting service on the master.