InnoDB: Error in opening ./ibdata1 问题重现

    今日由于需要重启线上服务器,当SA跟我说他那边已经OK 的时候,我便开始重启mysql:/usr/local/mysql/bin/mysqld_safe --user=mysql & 

但是看了下mysql错误日志,却发现如下错误:

InnoDB: Error in opening ./ibdata1
120412 13:38:09  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.5/en/operating-system-error-codes.html
120412 13:38:09 InnoDB: Could not open or create data files.
120412 13:38:09 InnoDB: If you tried to add new data files, and it failed here,
120412 13:38:09 InnoDB: you should now edit innodb_data_file_path in my.cnf back
120412 13:38:09 InnoDB: to what it was, and remove the new ibdata files InnoDB created
120412 13:38:09 InnoDB: in this failed attempt. InnoDB only wrote those files full of
120412 13:38:09 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
120412 13:38:09 InnoDB: remove old data files which contain your precious data!
120412 13:38:09 [ERROR] Plugin 'InnoDB' init function returned error.
120412 13:38:09 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
120412 13:38:09 [ERROR] Unknown/unsupported storage engine: innodb
120412 13:38:09 [ERROR] Aborting

120412 13:38:09 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

120412 13:38:09 mysqld_safe mysqld from pid file /data/mysql_db/mysql-b.pid ended


连接mysql报错如下:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

不过可以通过IP链接

mysql -uroot -p127.0.0.1 


经过反复试验。终于找到了问题所在,原因是在重启系统的时候已经默认启动了mysql,我又启动了一次。



你可能感兴趣的:(mysql)