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

2 篇文章 0 订阅

做主主同步时,

基本信息: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主主同步问题。


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值