綠色資源網(wǎng):您身邊最放心的安全下載站! 最新軟件|熱門排行|軟件分類|軟件專題|論壇轉(zhuǎn)帖|廠商大全

綠色資源網(wǎng)

技術(shù)教程
您的位置:首頁數(shù)據(jù)庫類MySQL → killall mysql服務(wù) mysql服務(wù)后無法啟動(dòng)

killall mysql服務(wù) mysql服務(wù)后無法啟動(dòng)

我要評論 2012/11/22 17:44:10 來源:綠色資源網(wǎng) 編輯:m.sonlywya.cn [ ] 評論:0 點(diǎn)擊:649次

Can”t init tc log Aborting | mysql事務(wù)日志導(dǎo)致啟動(dòng)失敗問題,killall  mysql進(jìn)程后,mysql無法啟動(dòng)問題總匯;

問題1:

將mysql所有進(jìn)程kill掉后,重啟,無法啟動(dòng),報(bào)錯(cuò):

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文件,刪掉,重啟,仍不行,報(bào)錯(cuò):

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)限,重啟,也不行,報(bào)錯(cuò):

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,會(huì)自動(dòng)生成新的mysql-bin.index文件,啟動(dòng)成功

問題2:

啟動(dòng)后,報(bào)錯(cuò):

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.*文件,重啟,啟動(dòng)成功

問題3:

啟動(dòng)后,報(bào)錯(cuò):

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修改成一個(gè)新的端口,重啟,啟動(dòng)成功。關(guān)閉后,重新將my.cnf中的port改回為43306,重啟,又可以成功啟動(dòng)了。

關(guān)鍵詞:mysql

閱讀本文后您有什么感想? 已有 人給出評價(jià)!

  • 0 歡迎喜歡
  • 0 白癡
  • 0 拜托
  • 0 哇
  • 0 加油
  • 0 鄙視