由于binlog日志带多删除了几个后发现MySQL主从不同步
1、由于binlog日志带多删除了几个后发现MySQL主从不同步
mysql> show slave status\G;
Slave_IO_Running: No
Slave_SQL_Running: Yes
查看报错日志为
[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file',
解决方式
从服务器配置:
主服务器查看
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000005 | 106 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
从服务器设置
mysql> change master to master_host='192.168.0.10',m