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;
- 主庫中關(guān)閉當前的二進制日志文件并創(chuàng)建一個新文件遇汞,新的二進制日志文件的名字在當前的二進制文件的編號上加1.
mysql> flush logs;
- 查看主庫狀態(tài),主要查看日志文件和位置:
mysql> show master status;
- 回到從庫中李皇,執(zhí)行命令匆光,使日志文件和位置對應主庫:
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/