错误
Slave_IO_Running: No
Last_IO_Error: 'Could not find first log file name in binary log index file'
解决办法:
1.从机器停止slave
mysql> slave stop;
2.在master上刷新日志:
mysql> flush logs;
3.记录新的master的bin的位置:
root@mysql 21:22 mysql>show master status;
+--------------------------+----------+--------------+------------------+------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+--------------------------+----------+--------------+------------------+------------------------------------------+
| mysql-compile-bin.000024 | 194 | | | 6243584b-077b-11eb-9633-000c29ae98d2:1-8 |
+--------------------------+----------+--------------+------------------+------------------------------------------+
1 row in set (0.00 sec)
4.马上到slave执行
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-compile-bin.000024',MASTER_LOG_POS=194;
mysql> slave start;
mysql> show slave status\G;
Slave_IO_Running: Yes
Slave_SQL_Running: Yes