MYSQL主从搭建GTID报错 error 1236 master has purged binary logs containing GTIDs?

主从的版本:5.7.25-28-log
现状:
 将主库的全备(innobackupex)还原作为一个从库,还原的过程正常,在设置从库报错:
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.' 

具体的操作过程是:
STOP SLAVE;
RESET SLAVE;
reset master ;
SET GLOBAL gtid_purged='xtrabackup_binlog_info文件获取的GTID值 '
此处的GTID是从备份恢复过来的文件:xtrabackup_binlog_info上获取,如下截图:

CHANGE MASTER TO MASTER_HOST='192.168.1.221', MASTER_PORT=3306, MASTER_USER='repl', MASTER_PASSWORD='uyIVUpxYZ6ai', MASTER_AUTO_POSITION=1;

show slave status就报错了:
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.'

部分参数配置:

请问知道这是什么原因吗?

参与16

1同行回答

renou2012renou2012  数据库管理员 , KE
首次同步可以先用MASTER_LOG_FILE+MASTER_LOG_POS执行恢复同步 然后修改成MASTER_AUTO_POSITION=1显示全部

首次同步可以先用MASTER_LOG_FILE+MASTER_LOG_POS执行恢复同步 然后修改成MASTER_AUTO_POSITION=1

收起
金融其它 · 2019-07-12
浏览4009

提问者

fengzhencai
数据库运维工程师亚飞

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2019-07-12
  • 关注会员:2 人
  • 问题浏览:4714
  • 最近回答:2019-07-12
  • X社区推广