How to solve InnoDB: Unable to lock ./ibdata1 mysql error?

本秂侑毒 提交于 2019-12-03 07:08:38

问题


2016-03-14 02:30:29 58150 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35 2016-03-14 02:30:29 58150 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.


回答1:


First, list MySQL processes using the ps command:

ps aux | grep mysql

And then kill the process

sudo kill 56311



回答2:


Believe it or not, the solution is elsewhere. The problem stems from AppArmor misconfiguration apparently.

So just do:

$ apt install apparmor-profiles

and then restart MySQL (notice how fast it'll restart).

I noticed a file missing related to AppArmor when doing:

$ systemctl status mysql.service

Voila.




回答3:


It should say "There is another solution: the problem might be AppArmor". If you do not see an entry in /var/log/apport.log, then probably AppArmor is not the problem.

An intriguing solution, however.



来源:https://stackoverflow.com/questions/35978228/how-to-solve-innodb-unable-to-lock-ibdata1-mysql-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!