The basic principle is, just restart where the slave left off. The problem arises if a binary log, on the slave side, remains corrupt. The recovery is relatively simple, just follow the recipe:
- STOP SLAVE
- SHOW SLAVE STATUS
- Note down ‘Relay_Master_Log_File’ and ‘Exec_Master_Log_Pos’ entries.
- RESET SLAVE
- CHANGE MASTER TO ….. (use MASTER_LOG_FILE=relay_master_log_file and MASTER_LOG_POS=exec_master_log_pos from Step 3)
- START SLAVE
This basically deletes all current relay logs from the slave and restarts replicating from exactly where it stopped by requesting a fresh binlog from the master.
Leave a Reply