Blog

Restart MySQL Replication

Imagine a MySQL-Master-Slave-Replication scenario with Slave being read-only.

When faced with the following error message issuing show slave status on Slave: "Could not find first log file name in binary log index file" you may do the following, being aware that you will loose all updates on the Slave since replication stoped.

Slave: STOP SLAVE;

Master: FLUSH LOGS;
Master: SHOW MASTER STATUS;

Slave: CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.XXXXXX', MASTER_LOG_POS=XXX;
Slave: START SLAVE;