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

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,高可用系列 2核4GB
简介: <p>原文:</p> <p>Disabling Binlog_checksum for MySQL 5.5/5.6 Master-master Replication<br> Replicating from a newer major version to an older major version in MySQL (for example a 5.6 master and a

原文:

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/


相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
目录
相关文章
|
4月前
|
SQL 监控 关系型数据库
|
5月前
|
SQL 关系型数据库 MySQL
MySQL数据库,可以使用二进制日志(binary log)进行时间点恢复
对于MySQL数据库,可以使用二进制日志(binary log)进行时间点恢复。二进制日志是MySQL中记录所有数据库更改操作的日志文件。要进行时间点恢复,您需要执行以下步骤: 1. 确保MySQL配置文件中启用了二进制日志功能。在配置文件(通常是my.cnf或my.ini)中找到以下行,并确保没有被注释掉: Copy code log_bin = /path/to/binary/log/file 2. 在需要进行恢复的时间点之前创建一个数据库备份。这将作为恢复的基准。 3. 找到您要恢复到的时间点的二进制日志文件和位置。可以通过执行以下命令来查看当前的二进制日志文件和位
504 1
|
2月前
|
应用服务中间件 nginx
nginx error日志 client intended to send too large body: 1434541 bytes 如何处理?
【8月更文挑战第27天】nginx error日志 client intended to send too large body: 1434541 bytes 如何处理?
167 6
|
3月前
|
数据库连接
系统日志使用问题之如何区分WARN和ERROR级别的日志
系统日志使用问题之如何区分WARN和ERROR级别的日志
|
3月前
|
架构师 存储
软件交付问题之在设计领域模型和状态机时,模型和状态机,如何解决
软件交付问题之在设计领域模型和状态机时,模型和状态机,如何解决
|
4月前
|
SQL 运维 关系型数据库
|
4月前
|
SQL 监控 关系型数据库
|
5月前
|
Android开发
双击eclipse提示an error has occurred See the log file E:\javatool\eclipse-mars-2\configuration\156991769
双击eclipse提示an error has occurred See the log file E:\javatool\eclipse-mars-2\configuration\156991769
69 1
|
5月前
|
Java 程序员
SpringBoot集成log4j2出现Logback configuration error detected: current ElementPath is
SpringBoot集成log4j2出现Logback configuration error detected: current ElementPath is
96 0
|
5月前
|
SQL JSON Kubernetes
Seata常见问题之服务端 error日志没有输出,客户端执行sql报错如何解决
Seata 是一个开源的分布式事务解决方案,旨在提供高效且简单的事务协调机制,以解决微服务架构下跨服务调用(分布式场景)的一致性问题。以下是Seata常见问题的一个合集
394 0