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

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.

First, list MySQL processes using the ps command:

ps aux | grep mysql

enter image description here

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