2011-12-20 90 views
0

我啓動MySql服務器時出現問題。 日誌說:無法啓動MySql服務器

InnoDB: Error in opening ./ibdata1 
111220 16:16:43 InnoDB: Operating system error number 11 in a file operation. 
InnoDB: Error number 11 means 'Resource temporarily unavailable'. 
InnoDB: Some operating system error numbers are described at 
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html 
InnoDB: Could not open or create data files. 
InnoDB: If you tried to add new data files, and it failed here, 
InnoDB: you should now edit innodb_data_file_path in my.cnf back 
InnoDB: to what it was, and remove the new ibdata files InnoDB created 
InnoDB: in this failed attempt. InnoDB only wrote those files full of 
InnoDB: zeros, but did not yet use them in any way. But be careful: do not 
InnoDB: remove old data files which contain your precious data! 
/usr/libexec/mysqld: Disk is full writing './mysql-bin.000028' (Errcode: 28). Waiting for someone to free space... Retry 
in 60 secs 

後,我檢查磁盤 - 它說,它的全部。 因此,在搜索解決方案後 - 我發現我需要清除二進制日誌。 但是,爲了清除 - 我需要啓動MySql服務器,但磁盤上的所有空間都由二進制日誌佔用,所以我無法啓動... 也不建議簡單地刪除二進制日誌。 所以,我有點卡住了。 無法運行mysql來清除日誌,並且無法清除日誌,因爲無法運行服務器。 有什麼幫助嗎? :)

編輯:該磁盤只包含日誌,沒有別的。

+0

有沒有別的可以暫時移動somwhere其他磁盤上? – 2011-12-20 16:43:16

回答

0

如果磁盤是EXT [2 | 3 | 4]可以使用tune2fs來設置根保留到0中的光盤的一部分,給你或許足夠呼吸室以啓動服務器

這將是tune2fs -m 0/dev/whatever(在卸載之後,當然)

+0

謝謝,但事實並非如此。 – Yuri 2011-12-21 08:33:36

0

嘗試使用選項--expire_logs_days =啓動mysql服務器,它應該在啓動時刪除日誌並比days更早。

再見 贊布羅塔

+0

謝謝,但似乎--expire_logs_days只是指定日誌滾動的頻率。但它不會使mysql立即滾動日誌。 – Yuri 2011-12-21 08:35:05

+0

那麼,文檔報告:「可能的刪除發生在啓動時和二進制日誌刷新。」,所以我想如果你使用類似mysqld --expire_log_days = 10的東西,它會刪除所有舊的10天的binlog文件 – Gianluca 2011-12-21 09:03:27

+0

也許它發生在啓動後,但是由於啓動失敗,它沒有效果。 – Yuri 2011-12-22 10:07:06