Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log:
'Slave can not handle replication events with the checksum that master is configured to log;
the first event 'mysql-bin.000005' at 16750821...'
主從版本不一致導致 Binlog Checksum 算法不兼容:
binlog_checksum=CRC32)5.6 引入 Binlog Checksum 功能,5.5 無法解析帶 checksum 的事件。
將 Slave 升級至與 Master 相同主版本(如 5.6.29 或 5.7.x)。重新編譯安裝或 yum 升級後,重新配置主從。
Master my.cnf:
[mysqld]
binlog_checksum=NONE
重啟 Master,重新同步。缺點:失去數據完整性校驗保護。
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
或永久跳過特定錯誤碼 my.cnf:
[mysqld]
slave-skip-errors=1062,1053,1146 # 僅跳過主鍵衝突等非致命錯誤
# slave-skip-errors=all # 絕對禁止!
ERROR 1064 (42000) at line 279: ... near 'STATS_PERSISTENT=0'
同樣是版本差異:5.6 引入 STATS_PERSISTENT 表選項,5.5 不識別。
解決:統一版本或使用 mysqldump --compatible=mysql55 導出兼容格式。
SHOW VARIABLES LIKE 'binlog_checksum';。Last_IO_Errno、Seconds_Behind_Master。