您的位置:首页 > 数据库 > MySQL

mysql同步复制报Slave can not handle replication events with the checksum that master 错误

2014-12-15 15:16 239 查看
做主主同步时,

基本信息:1.master1 mysql版本是5.6

                    2.master2 mysql版本时5.5

一:在master1做slave,master2做主数据库时成功。

二:在master1做master,master2做从数据库时报错

      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.000001' at 5115510, the last event read from './mysql-bin.000001'
at 5115510, the last byte read from './mysql-bin.000001' at 120.'

查询资料发现mysql版本为5.6时,

这个错误一般出现在master5.6,slave在低版本的情况下。这是由于5.6使用了crc32做binlog的checksum;

当一个event被写入binary log(二进制日志)的时候,checksum也同时写入binary log,然后在event通过网络传输到从服务器(slave)之后,再在从服务器中对其进行验证并写入从服务器的relay
log.

由于每一步都记录了event和checksum,所以我们可以很快地找出问题所在。

在master1中设置binlog_checksum =none;
重启mysql

重新查询master状态,show master status\G;

记录下来。

从服务器重新进行连接:

change master to master_host='192.168.15.201',master_user='repl',master_password='epimap.123456',master_log_file='mysql-bin.000012',master_log_pos=211;

即可解决5.5/5.6主主同步问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐