程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> killall mysql服務 mysql服務後無法啟動

killall mysql服務 mysql服務後無法啟動

編輯:關於MYSQL數據庫

      Can”t init tc log Aborting | mysql事務日志導致啟動失敗問題,killall mysql進程後,mysql無法啟動問題總匯;

      問題1:

      將mysql所有進程kill掉後,重啟,無法啟動,報錯:

      110303 14:01:45 InnoDB: Started; log sequence number 0 138710263

      /usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 13)

      110303 14:01:45 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 13)

      110303 14:01:45 [ERROR] Could not open log file

      110303 14:01:45 [ERROR] Can’t init tc log

      110303 14:01:45 [ERROR] Aborting

      在mysql/data/目錄下找到mysql-bin.000041文件,刪掉,重啟,仍不行,報錯:

      110303 14:04:07 InnoDB: Started; log sequence number 0 138710263

      /usr/local/mysql/bin/mysqld: File ‘./mysql-bin.000041′ not found (Errcode: 2)

      110303 14:04:07 [ERROR] Failed to open log (file ‘./mysql-bin.000041′, errno 2)

      110303 14:04:07 [ERROR] Could not open log file

      110303 14:04:07 [ERROR] Can’t init tc log

      110303 14:04:07 [ERROR] Aborting

      touch之,修改權限,重啟,也不行,報錯(www.45it.com):

      110303 14:05:41 InnoDB: Started; log sequence number 0 138710263

      110303 14:05:41 [ERROR] I/O error reading the header from the binary log, errno=-1, io cache code=0

      110303 14:05:41 [ERROR] I/O error reading the header from the binary log

      110303 14:05:41 [ERROR] Can’t init tc log

      110303 14:05:41 [ERROR] Aborting

      最後解決辦法:

      將mysql/data/mysql-bin.index文件刪除,重啟mysql,會自動生成新的mysql-bin.index文件,啟動成功

      問題2:

      啟動後,報錯:

      InnoDB: Started; log sequence number 0 1004308157

      110303 14:15:01 [Note] Recovering after a crash using mysql-bin

      110303 14:15:01 [ERROR] Error in Log_event::read_log_event(): ‘read error’, data_len: 169, event_type: 2

      110303 14:15:01 [Note] Starting crash recovery…

      110303 14:15:01 [Note] Crash recovery finished.

      /opt/31306/mysql/bin/mysqld: Disk is full writing ‘./mysql-bin.~rec~’ (Errcode: 28). Waiting for someone to free space… (Expect up to 60 secs delay for server to continue after freeing disk space)

      這是由於mysql-bin日志過多,進入mysql/data/目錄,果斷刪除所有mysql-bin.*文件,重啟,啟動成功

      問題3:

      啟動後,報錯:

      110303 14:21:37 InnoDB: Started; log sequence number 0 487312871

      110303 14:21:37 [ERROR] Can’t start server: Bind on TCP/IP port: Address already in use

      110303 14:21:37 [ERROR] Do you already have another mysqld server running on port: 43306 ?

      110303 14:21:37 [ERROR] Aborting

      按提示,應該是43306端口占用,但是查看後並未發現該端口被占用,不深究,果斷將其my.cnf文件中的port修改成一個新的端口,重啟,啟動成功。關閉後,重新將my.cnf中的port改回為43306,重啟,又可以成功啟動了。

    1. 上一頁:
    2. 下一頁:
    Copyright © 程式師世界 All Rights Reserved