I don't know why, all of a sudden I cannot open anymore MySQL. I get the following error:

bomble@ChemAlive:~/ChemAliveCode/SABIC$ mysql -h localhost -u bomble  

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I tried to restart MySQL doing:

bomble@ChemAlive:~/ChemAliveCode/SABIC$ sudo /etc/init.d/mysql restart
[sudo] password for bomble:

But it failed:

* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]

I had a look at my error.log file. Here's what it says:

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.

Don't know what that means?


1 Answer 1


Found it:

If I restart using

service mysql restart

instead of

sudo /etc/init.d/mysql restart

It restarts fine, and I can then login to MySQL.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.