6
SECTION 6 · VERIFICATION — DO NOT LEAVE BEFORE CONFIRMING
SHOW SLAVE STATUS — FULL BREAKDOWN
◆ THE VERIFICATION COMMAND
SQL — RUN ON TARGET
SHOW SLAVE STATUS\G
Slave_IO_Running: Yes — the I/O thread is connected to SOURCE and reading the binlog. If No: network issue or incorrect credentials.
Slave_SQL_Running: Yes — the SQL thread is applying events on TARGET. If No: SQL error, check Last_SQL_Error.
Seconds_Behind_Master: 0 — TARGET is synchronised. A non-zero value indicates replication lag — normal just after start, must converge to 0.
Last_IO_Error / Last_SQL_Error — if non-empty: read and address before continuing.
⚠️ COMMON ERRORS AND FIXES
Error 1236 — Could not find first log file: the binlog position in xtrabackup_binlog_info is stale (binlogs have been purged on SOURCE). Fix: purge_logs_before or redo the backup.
Error 1062 — Duplicate entry: a row already exists on TARGET. If non-critical: SET GLOBAL slave_skip_errors = 1062; and restart the slave. Investigate the root cause.
Error 2003 — Can't connect to MySQL server: check the firewall on SOURCE, bind-address in my.cnf (bind-address = 0.0.0.0 or TARGET IP).
Slave_IO_Running: Connecting: incorrect credentials or repl_user not authorised from TARGET IP. Check SHOW GRANTS FOR 'repl_user'@'%';
✅ POST-DEPLOYMENT MONITORING
watch -n 2 "mysql -e 'SHOW SLAVE STATUS\G' | grep -E 'Running|Behind|Error'"
SELECT COUNT(*), MAX(id) FROM my_table;
SELECT COUNT(*), MAX(id) FROM my_table;
If you saturate the disk or lock the tables, you are no longer an engineer — you are a saboteur. This strategy avoids both. Clean and direct.
وَرَبُّنَا الرَّحْمَٰنُ الْمُسْتَعَانُ عَلَىٰ مَا يَصِفُونَ