'Could not find first log file name in binary log index file'的解決辦法
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'
解決辦法:
從機器停止slave
mysql> slave stop;
到master機器登陸mysql:
記錄master的bin的位置,例如:mysql> show mster status;
+-------------------+----------+--------------+-------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+-------------------+----------+--------------+-------------------------------------------+
| mysqld-bin.000010 | 106 | | information_schema,mysql |
+-------------------+----------+--------------+-------------------------------------------+
日誌為mysqld-bin.000010
重新整理日誌:mysql> flush logs;
因為重新整理日誌file的位置會+1,即File變成為:mysqld-bin.000011
馬上到slave執行
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysqld-bin.000011',MASTER_LOG_POS=106;
mysql> slave start;
mysql> show slave status\G;