Last_IO_Error: Got fatal error 1236 from master when reading data from binary log报错解决
MySQL5.7.x使用GTID主从同步show slave status时候报错信息如下
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Slave has more GTIDs than the master has, using the master's SERVER_UUID. This may indicate that the end of the binary log was truncated or that the last binary log file was lost, e.g., after a power or disk failure when sync_binlog != 1. The master may or may not have rolled back transactions that were already replica'
解决方法如下:
在Master上使用show master status查看 Executed_Gtid_Set的值,
在Slave上执行如下操作:
RESET MASTER;
set global gtid_purged = 'xxxx'; -- 这里xxxx是Master的Executed_Gtid_Set
start slave;
show slave status\G;
问题解决,一般出现该问题主要是没正常操作binlog或主库宕机等引起gtid发生变化造成的。
[ERROR] Slave I/O: 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.', Error_code: 1236
也可用同样的方法解决.
Tag标签:「主从 同步 Last_IO_Error」更新时间:「2022-07-30 19:17:10」阅读次数:「832」