0

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?

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
asked Mar 3, 2016 at 12:17
0

1 Answer 1

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.

Paul White
95.4k30 gold badges440 silver badges689 bronze badges
answered Mar 4, 2016 at 8:30
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.