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.
Asked
Active
Viewed 7.2k times
23

Wojtek Dmyszewicz
- 4,188
- 5
- 30
- 42
-
6Did you check for another mysqld process? It sounds like you're already running the daemon. – Isaac Bennetch Mar 14 '16 at 01:43
4 Answers
76
First, list MySQL processes using the ps command:
ps aux | grep mysql
And then kill the process
sudo kill 56311

Wojtek Dmyszewicz
- 4,188
- 5
- 30
- 42
3
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.

fevangelou
- 315
- 3
- 7
-
That solved the issue, just as a side note in case some one else is having the same problem; apparmor errors are reported on syslog at mysql startup. Errors look like this: audit: type=1400 audit(1490314801.743:24): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=21133 comm="apparmor_parser" – Chepech Mar 15 '18 at 05:24
2
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.

Jeff Silverman
- 692
- 1
- 8
- 15
-
1Great answer that clarifies the context of the other two answers. A suggestion, don't start with "I guess" you either *know* or don't post an answer LOL https://stackoverflow.com/help/how-to-answer ... It might be good to link to another answer or some docs that support what you're saying but still, +1 for the answer as it stands, it helped me just now – JimLohse Jun 05 '19 at 15:33
0
I had a similar issue it was AppArmor misconfiguration Data directory should be "rwk" whereas I configured it as "rw"

Shithanshu
- 21
- 1