mysql主从复制报错
1. 问题1
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.000110' at 942445468, the last event read from '/server/mysql/log/mysql-bin.000110' at 123, the last byte read from '/server/mysql/log/mysql-bin.000110' at 123.'
原因分析:
为了解决软硬件或者网络传输出错,导致主服务器上运行的sql语句与从服务器上运行的sql语句不一致(称为event corrupt)的问题,mysql5.6版本添加了replication event checksum功能 。当一个event被写入binary log的时候,checksum也同时写入binary log,然后在event通过网络传输到slave之后,再在slave上对其进行验证并写入slave的relay log 。由于每一步都记录了event和checksum,所以我们可以很快地找出问题所在。
主:mysql5.7
从:mysql5.5
解决方法:
将主的checksum改为none
set global binlog_checksum=none
show global variables like '%binlog_checksum%';
配置文件:添加一行binlog-checksum=none
一往无前虎山行,拨开云雾见光明

浙公网安备 33010602011771号