文章来自:Mysql主从库不同步1236错误:could not find first log file name in binary....
mysql > show master status;
+------------------+----------+--------------+------------------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------------------+-------------------+
| mysql-bin.001724 | 703460812| | information_schema,sys,mysql | |
+------------------+----------+--------------+------------------------------+-------------------+
mysql > show master status;
+------------------+----------+--------------+------------------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------------------+-------------------+
| mysql-bin.001240 | 333460812| *** | information_schema,sys,mysql | |
+------------------+----------+--------------+------------------------------+-------------------+
mysql > stop slave ;
mysql > flush logs;
mysql > show master status;
mysql > CHANGE MASTER TO MASTER_LOG_FILE='log-bin.000005',MASTER_LOG_POS=107;
mysql > start slave ;
mysql > show slave status;
设置忽略错误命令:set global sql_slave_skip_counter =1;
Slave_IO_State: Waiting for master to send event
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
mysql > reset slave;
mysql > start slave;