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

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: <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日志并进行多维度分析。
目录
相关文章
|
26天前
|
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. 找到您要恢复到的时间点的二进制日志文件和位置。可以通过执行以下命令来查看当前的二进制日志文件和位
|
缓存 JavaScript
运行vue报错npm ERR! A complete log of this run can be found in解决办法
在这里我们需要清除npm的缓存: (1)在cmd命令行窗口中输入:npm cache clean --force (2)然后再运行我们需要安装模块的命令,输入npm install。 有时是网络问题,依赖包加载不完整,删掉node_modules文件后,重新执行npm install即可。
|
11月前
|
11月前
|
缓存 JavaScript Nacos
Vue 报错整理:npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jinchuang\AppData...
我是在npm install的时候出现的这个问题,开始是安装不上,提示升级npm,然后我按要求升级npm i npm 依然报错 解决方法:1. 删除本地node_modules 依赖包2. 执行 npm cache clean --force 清理缓存3. npm install。
172 0
|
11月前
|
监控 iOS开发 MacOS
iOS 友盟崩溃日志分析——Binary images
iOS 友盟崩溃日志分析——Binary images
214 0
|
缓存 资源调度
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Yang\AppData\Local\npm-ca
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Yang\AppData\Local\npm-ca
474 0
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Yang\AppData\Local\npm-ca
|
Java Spring
set Spring log level to debug so that we can learn more from log
set Spring log level to debug so that we can learn more from log
79 0
set Spring log level to debug so that we can learn more from log
SAP Customer Data Cloud的Audit log设置
SAP Customer Data Cloud的Audit log设置
94 0

热门文章

最新文章