Got fatal error 1236 from master when reading data from binary log: ‘Slave can not handle replicatio

来源:互联网 发布:御泥坊淘宝旗舰店真假 编辑:程序博客网 时间:2024/05/16 13:40

原文:

Disabling Binlog_checksum for MySQL 5.5/5.6 Master-master Replication
Replicating from a newer major version to an older major version in MySQL (for example a 5.6 master and a 5.5 replica) is generally not recommended, but when upgrading a master-master replication topology it’s hard to avoid this scenario entirely. We ended up in this situation last week when upgrading the passive master of an active-passive master-master pair from 5.5 to 5.6. The primary replication flow was going from the active master (5.5) to the passive master (5.6) with no errors, but pt-heartbeat was running on the passive master, which led to a replication failure with this error on the active master:
Last_IO_Error: 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 ‘bin-log.002648’ at 4, the last event read from ‘/var/lib/mysqllogs/bin-log.002648’ at 120, the last byte read from ‘/var/lib/mysqllogs/bin-log.002648’ at 120.’
Why did this happen? Starting in MySQL 5.6.6, the new binlog_checksum option defaults to CRC32. Since that option did not exist in MySQL 5.5, the replica can’t handle the checksums coming from the master. Therefore I recommend setting binlog_checksum=NONE in my.cnf as part of the upgrade process for a master-master setup to avoid this error.
My fix was to run this on the passive master:
1
set global binlog_checksum='NONE';
Then I added this to my.cnf so it would survive a restart:

1
binlog_checksum=NONE
After that change was made I examined the binary log to confirm that it did not include anything other than pt-heartbeat activity, and then executed CHANGE MASTER on the active master to skip the checksummed events.
Once the other master is upgraded I can go back and consider changing binlog_checksum to CRC32.
Apr 29th, 2014
MySQL
Comments
Posted by Ike Walker


翻译:


禁用Binlog_checksum MySQL 5.5/5.6 -主复制

从新的主要版本复制到一个年长的主要版本在MySQL中(例如5.6大师和一个5.5副本)通常不推荐,但是当升级-主复制拓扑ita€™年代很难完全避免这种情况。 在这种情况下我们最终上周升级主被动的被动主-主副从5.5到5.6。 主复制流从活跃的主人(5.5)的被动大师(5.6),没有错误,但是pt-heartbeat是运行在被动的主人,导致复制失败与主动掌握这个错误:

Last_IO_Error:有致命错误1236从二进制日志读取数据时从主:一个€˜奴隶不能处理复制事件的校验和主配置日志;第一个事件€˜bin-log。 002648一个€™4,最后一个事件读取€˜/ var / lib / mysqllogs / bin-log。 002648一个€™120岁的最后一个字节读取€˜/ var / lib / mysqllogs / bin-log。 002648一个€™在120.€™

为什么会这样? 从MySQL 5.6.6,新的binlog_checksum选择默认值CRC32。 自该选项不存在在MySQL 5.5中,复制品迦南€™t处理来自大师的校验和。 因此我建议设置binlog_checksum =没有作为在my . cnf中所做的升级过程-主设置以避免这个错误。

我的修复是运行这个被动的主人:

1
set global binlog_checksum='NONE';

然后我添加了所以在my . cnf中所做生存一个重启:

1
binlog_checksum=NONE

改变后我检查了二进制日志来确认它不包括任何pt-heartbeat活动,然后执行修改主在活动的主人跳过校验和事件。

一旦其他大师升级我可以回去考虑改变binlog_checksumCRC32。 


原文:

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


0 0