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:

  1. STOP SLAVE
  2. SHOW SLAVE STATUS
  3. Note down ‘Relay_Master_Log_File’ and ‘Exec_Master_Log_Pos’ entries.
  4. RESET SLAVE
  5. CHANGE MASTER TO ….. (use MASTER_LOG_FILE=relay_master_log_file and MASTER_LOG_POS=exec_master_log_pos from Step 3)
  6. 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.

Pin It on Pinterest

Share This