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 ma...显示全部

主从的版本: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

返回renou2012的回答

renou2012renou2012  数据库管理员 , KE

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

金融其它 · 2019-07-12
浏览4007

回答者

renou2012
数据库管理员KE

renou2012 最近回答过的问题

回答状态

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