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

北城以北 提交于 2019-12-02 20:46:37

First, list MySQL processes using the ps command:

ps aux | grep mysql

And then kill the process

sudo kill 56311

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.

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.

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