從庫從主庫的一天前的備份恢復後,出現了以下錯誤:html
SITION = 1, but the master has purged binary logs containing GTIDs that the slave requires
該實例的每秒事務在大概4K左右,因此主庫上Binlog很快被沖走了。但因爲多數爲更新類的事務,老數據總會被最新的更改覆蓋成正確的記錄。零星會有插入或者刪除的操做mysql
set sql_log_bin=0; stop slave; reset master; set global gtid_purged='90ceab5e-5a7f-490e-8103-caf8219a3075:1-88512715043,d54dc219-8fe7-11e8-826f-246e96637188:1-3,e154990a-8fe7-11e8-a92a-246e9661e038:1-3,ec803005-8fe7-11e8-af66-246e9663e440:1-3'; set global slave_exec_mode=IDEMPOTENT; start slave;