Ubuntu下mysql无法重启

来源:互联网 发布:sd卡数据修复 编辑:程序博客网 时间:2024/05/19 22:56

错误日志:

$ tail -n 100 /var/log/mysql/error.log | head -n 20  #或者 tail -n 20 /var/log/mysql/error.log

最近的错误信息:

InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
151009 21:54:03  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
151009 21:54:03  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

错误已经很明确了:存在其它的mysql数据库服务进程


$ ps aux | grep mysql


找到mysqld进程ID,kill

mysql     6821  0.0  1.1 484456 47276 ?        Ssl  22:15   0:00 /usr/sbin/mysqld

$ sudo kill 6821  #这里的数字是mysqld的进程ID


$ sudo /etc/init.d/mysql start

0 0
原创粉丝点击