killall mysql服務(wù) mysql服務(wù)后無法啟動
Can”t init tc log Aborting | mysql事務(wù)日志導(dǎo)致啟動失敗問題,killall mysql進(jìn)程后,mysql無法啟動問題總匯;
問題1:
將mysql所有進(jìn)程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之,修改權(quán)限,重啟,也不行,報錯:
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日志過多,進(jìn)入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
按提示,應(yīng)該是43306端口占用,但是查看后并未發(fā)現(xiàn)該端口被占用,不深究,果斷將其my.cnf文件中的port修改成一個新的端口,重啟,啟動成功。關(guān)閉后,重新將my.cnf中的port改回為43306,重啟,又可以成功啟動了。
關(guān)鍵詞:mysql
閱讀本文后您有什么感想? 已有 人給出評價!
- 0
- 0
- 0
- 0
- 0
- 0