Fatal error reading binary log on master
Production Risk
Critical — replication stops; replica falls behind and may serve stale data.
The replica encountered a fatal error while reading the binary log from the source server, causing replication to stop. This usually means the binary log file is corrupted, missing, or the log position is invalid.
- 1Binary log file on the source is corrupted or truncated.
- 2Specified MASTER_LOG_POS points to an invalid position.
- 3Source server was restarted and binary logs were purged.
- 4Network interruption causing partial binlog event transmission.
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000999', MASTER_LOG_POS=9999999;
expected output
ERROR 1982 (HY000): Fatal error reading the binary log while attempting to dump from master.
Fix 1
Identify and set a valid binary log position on the source
SHOW MASTER STATUS; -- on source CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=4; -- on replica
Why this works
A valid starting position allows the replica to resume reading events.
Fix 2
Re-initialise replication from a fresh backup
STOP SLAVE; RESET SLAVE ALL; -- Restore backup, then CHANGE MASTER TO ...
Why this works
If the binlog position is irrecoverable, re-seeding from backup is the safest option.
✕
MySQL 8.0 — 1982 ER_MASTER_FATAL_ERROR_READING_BINLOG
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev