600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > mysql gtid 1236_MYSQL主从搭建GTID报错 error 1236 master has purged binary logs containing GTIDs?...

mysql gtid 1236_MYSQL主从搭建GTID报错 error 1236 master has purged binary logs containing GTIDs?...

时间:2021-10-18 05:00:33

相关推荐

mysql gtid 1236_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;

showslavestatus就报错了:

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.'

部分参数配置:

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。