DBAtlas · Database operations atlas

1236: Got fatal error 1236 from master when reading data from binary log

MySQL

What does it mean?

A replica (slave) server received a fatal error while reading data from the source's (master's) binary log, and replication stopped. The replica cannot find the position it expects in the source's binlog.

Why does it happen?

The required binary log files were deleted on the source (binlog_expire_logs_seconds — expire_logs_days before 8.0, removed in 8.4 — or PURGE BINARY LOGS); a GTID gap/mismatch; a corrupted binlog position after a source crash; or the replica fell so far behind that it requests a log that no longer exists. 'Could not find first log file name in binary log index file' is the typical sub-message.

How to fix it

Inspect replication status: SHOW REPLICA STATUS\G (8.0.22+; SHOW SLAVE STATUS in older versions, the old syntax was removed in 8.4). List the binlogs available on the source: SHOW BINARY LOGS; If the missing log was purged, you must rebuild the replica from a new backup/GTID position (mysqldump --source-data — --master-data before 8.0.26, a deprecated alias in 8.0.26+ — or the CLONE plugin). Increase binlog retention on the source to fit the workload; if you use GTIDs, verify GTID gaps.

Open in DBAtlas →

More from this engine