請教大家
是否有遇過下列的情況,telnet MYSQL服務的3306 PORT是沒有通,但是檢查她的狀態卻是在執行成功的狀態,煩請大家指點迷津,感謝
在mysqld.log有看到下列的資訊,是哪裡要加入IP的對應呢?煩請大家指點迷津 (是在my.cnf加入IP的設定嗎?)
180407 8:53:11 InnoDB: Waiting for the background threads to start
180407 8:53:12 InnoDB: 5.5.42 started; log sequence number 2447407723
180407 8:53:12 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
180407 8:53:12 [Note] - '0.0.0.0' resolves to '0.0.0.0';
180407 8:53:12 [Note] Server socket created on IP: '0.0.0.0'.
180407 8:53:12 InnoDB: Error: page 1634 log sequence number 2448111769
InnoDB: is in the future! Current system log sequence number 2447407723.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
180407 8:53:12 InnoDB: Error: page 11748 log sequence number 2453014172
InnoDB: is in the future! Current system log sequence number 2447407723.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
如果是telnet localhost 3306,不知道結果是如何的呢?
"is in the future" 它是告訴你,你的資料記錄"在未來"!白話文意思就是說系統時間倒退了。請檢查一下你的電腦時間對不對,執行校時一下吧。
錯誤訊息已說明問題發生的原因:
InnoDB: is in the future! Current system log sequence number 2447407723.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
MySQL預設有兩個交易log檔: ib_logfile0和ib_logfile1, 這兩個log檔記載的時間是在表格空間(tablespace)資料記載的時間之後, 也就是未來. 這種問題發生在資料庫毀損, 備份時ib_logfile0和ib_logfile1沒一起備份, 等等問題. 可以救, 請參考:
https://boknowsit.wordpress.com/2012/12/22/mysql-log-is-in-the-future/
上述文章少了一個重要步驟: 先備份整個MySQL資料目錄:
$ tar cfj fullbackup.tar.bz2 <path-to-mysql-data>/
請先做這個步驟!!!