无法启动MySql服务器

时间:2011-12-20 16:34:02

标签: 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来清除日志而无法清除日志,因为无法运行服务器。 有帮助吗? :)

编辑:磁盘只包含日志,没有别的。

2 个答案:

答案 0 :(得分:0)

如果磁盘是ext [2 | 3 | 4],你可以使用tune2fs将为root保留的磁盘部分设置为0,为你提供足够的喘息空间来启动服务器

这将是tune2fs -m 0 / dev / whatever(在卸载之后,当然)

答案 1 :(得分:0)

尝试使用选项--expire_logs_days =启动mysql服务器,它应该在启动时删除日志和早于days目录。

再见 詹卢卡