Last_IO_Error: Got fatal error 1236 from master when reading data from binary log:
‘Could not find first log file name in binary log index file’
如需了解更多:https://www.emperinter.info/2022/05/05/mysql-master-slave-got-fatal-error-1236/
解决办法:
- 首先停止从库同步:
mysql> stop slave;
- 主库中关闭当前的二进制日志文件并创建一个新文件,新的二进制日志文件的名字在当前的二进制文件的编号上加1.
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;
如需了解更多:https://www.emperinter.info/2022/05/05/mysql-master-slave-got-fatal-error-1236/