Instructions on how to resync a MySQL slave/master replication.
I noticed that replication had stopped on my slave server with the error;
Normally means that your slave has lost contact with your master and the log files that it uses to sync are behind - it's confused!
Pretty simple to fix. Run the commands below on the mysql shell of each server;
At the MASTER;
SHOW MASTER STATUS;
Copy the values of the result of the last command somewhere (MASTER_LOG_FILE and MASTER_LOG_POS).
At the SLAVE;
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98; (<- change to your values!)
SHOW SLAVE STATUS \G;
Done! You should now see the updated log files and positions.