digdeep

凡是过去,皆是序幕。Read the fucking manual and source code.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

mysql从库复制报错:

Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'event read from binlog did not pass crc check; the first event '' at 4, the last event read from './mysql-bin.031260' at 506629253, the last byte read from './mysql-bin.031260' at 506637422.'

到主库上面校验一下日志文件:

mysqlbinlog --verify-binlog-checksum /data/mysqldb/mysql-bin.031260

报错:

ERROR: Error in Log_event::read_log_event(): 'Event crc check failed! Most likely there is event corruption.', data_len: 8169, event_type: 30
ERROR: Could not read entry at offset 506629253: Error in log format or read error.
WARNING: The range of printed events ends with a row event or a table map event that does not have the STMT_END_F flag set.
This might be because the last statement was not fully written to the log, or because you are using a --stop-position or --stop-datetime that refers to an event in the middle of a statement.
The event(s) from the partial statement have not been written to output.

可以看到是主库上面的binlog有问题,所以这个只能重新搭建从库。重新搭建主从复制。

如果主库上面的校验没有报错,那么可以在从库上面禁用校验解决:

stop slave;

set global binlog_checksum=0;

start slave;

 

posted on 2022-09-05 11:19  digdeep  阅读(286)  评论(0编辑  收藏  举报
不懂数据库和Web安全的架构师不是一个好的程序员。