數據庫主從出錯:mysql
Slave_IO_Running: No 一方面緣由是由於網絡通訊的問題也有多是日誌讀取錯誤的問題。如下是日誌出錯問題的解決方案:sql
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;spa
到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.000010orm
刷新日誌:mysql> flush logs;it
由於刷新日誌file的位置會+1,即File變成爲:mysqld-bin.000011io
立刻到slave執行ast
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysqld-bin.000011',MASTER_LOG_POS=106;
mysql> slave start;
mysql> show slave status\G;