1236: Got fatal error 1236 from master when reading data from binary log
MySQLWhat 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.
More from this engine
- 1049Unknown database 'name'
- 1364Field 'name' doesn't have a default value
- 1206The total number of locks exceeds the lock table size
- 1129Host 'host' is blocked because of many connection errors
- 1194Table 'name' is marked as crashed and should be repaired
- 1615Prepared statement needs to be re-prepared
- 1553Cannot drop index needed in a foreign key constraint