摘自:http://1.1lifes.sinaapp.com/?p=186
我是linux新手,安裝軟體也是胡亂安裝,找了一篇文章。將mysql安裝到一個特定檔案下了,但後來壓測handlersocket,mysql突然crash了。去啟動怎麼也啟動不了,無奈呀!我安裝mysql的檔案夾在/opt/yq下,啟動不了,自然去找錯誤記錄檔了,但因為安裝檔案使用的預設,google了一下,說在按安裝路徑的data下,也確實找到了相關記錄檔,檔案名稱為***.err檔案,發現裡面的內容很舊,鬱悶。說明後面啟動mysql的錯誤記錄檔沒在這裡。那在哪裡呢?繼續找,google後發現/data/mysql/下會有相關的日誌,到裡面後發現裡面除了錯誤記錄檔檔案外還有資料檔案,查看裡面的錯誤記錄檔:
111217 23:23:57 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files… InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer… InnoDB: Last MySQL binlog file position 0 406839588, file name ./mysql-bin.000012 111217 23:23:58 InnoDB: Waiting for the background threads to start 111217 23:23:59 InnoDB: 1.1.8 started; log sequence number 3430959679 handlersocket: not listening for reads handlersocket: not listening for writes handlersocket: initialized 111217 23:23:59 [Note] Recovering after a crash using mysql-bin 111217 23:24:04 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 749, event_type: 23 111217 23:24:04 [Note] Starting crash recovery… 111217 23:24:04 [Note] Crash recovery finished. /opt/yq/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) |
發現紅色部分,原來是磁碟滿了,狂暈!ll -lh查看了一下檔案大小 mysql-bin Database Backup檔案太大了,刪除,重啟問題解決了,哈哈!不錯!