# mysqldump -uroot -p xxx > xxx.sql
mysql> stop slave; mysql> source xxx.sql;
錯誤:mysql
Slave_IO_Running:No Slave_SQL_Running:Yes Last_IO_Error:Got fatal error1236from 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.'
解決:sql
master>show global variables like 'GTID_EXECUTED'; +---------------+-------------------------------------------+ |Variable_name|Value| +---------------+-------------------------------------------+ |gtid_executed|9a511b7b-7059-11e2-9a24-08002762b8af:1-14| +---------------+-------------------------------------------+
slave1>reset master; slave1>show global variables like 'GTID_EXECUTED'; +---------------+-------+ |Variable_name|Value| +---------------+-------+ |gtid_executed|| +---------------+-------+ slave1>set global GTID_PURGED="9a511b7b-7059-11e2-9a24-08002762b8af:1-14"; slave1>start slave; slave1>show slave status\G [...] Slave_IO_Running:Yes Slave_SQL_Running:Yes [...]