Received error packet: errno = 1236, sqlstate = HY000 errmsg = Slave can not handle replication even

来源:互联网 发布:中文翻译缅甸语软件 编辑:程序博客网 时间:2024/06/05 11:16

使用版本是5.6.22


异常:

Caused by: java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Slave can not handle replication events with the checksum that master is configured to log; the first event 'mysql-bin.000001' at 3065, the last event read from '.\mysql-bin.000001' at 3065, the last byte read from '.\mysql-bin.000001' at 120.


http://whitesock.iteye.com/blog/1329616

http://www.iteye.com/topic/1129002 七锋已经fix了canal的,要合到dbsync里面。

http://www.bitscn.com/pdb/mysql/201404/228411.html

http://mechanics.flite.com/blog/2014/04/29/disabling-binlog-checksum-for-mysql-5-dot-5-slash-5-dot-6-master-master-replication/

查询资料发现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> show variables like "%sum%";+---------------------------+--------+| Variable_name             | Value  |+---------------------------+--------+| binlog_checksum           | CRC32  || innodb_checksum_algorithm | innodb || innodb_checksums          | ON     || master_verify_checksum    | OFF    || slave_sql_verify_checksum | ON     |+---------------------------+--------+5 rows in set (0.00 sec)mysql> set global binlog_checksum='NONE'Query OK, 0 rows affected (0.09 sec)mysql> show variables like "%sum%";+---------------------------+--------+| Variable_name             | Value  |+---------------------------+--------+| binlog_checksum           | NONE   || innodb_checksum_algorithm | innodb || innodb_checksums          | ON     || master_verify_checksum    | OFF    || slave_sql_verify_checksum | ON     |+---------------------------+--------+


重启mysql


0 0
原创粉丝点击