首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >MYSQL主从报错 Got fatal error 1236 from master when reading data from binary log

MYSQL主从报错 Got fatal error 1236 from master when reading data from binary log

原创
作者头像
大大刺猬
发布于 2023-05-18 17:07:18
发布于 2023-05-18 17:07:18
1.7K0
举报
文章被收录于专栏:大大刺猬大大刺猬

报错

Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID sets and the missing purged transactions are too long to print in this message. For more information, please see the master's error log or the manual for GTID_SUBTRACT.'

代码语言:javascript
复制
 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID sets and the missing purged transactions are too long to print in this message. For more information, please see the master's error log or the manual for GTID_SUBTRACT.'

解决

一般遇到1236错误, 多数情况都是跳过事务, 但这个错误无法跳过. 解决办法:重新设置主从即可

代码语言:sql
复制
CHANGE MASTER TO
         MASTER_HOST='192.168.101.51',
         MASTER_PORT=3306,
         MASTER_USER='repl',
         MASTER_PASSWORD='repl',
         master_auto_position=1;
start slave;
show slave status\G

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

目录
  • 报错
  • 解决
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档