Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had mysql server running. I stopped it, and removed it (apt-get remove mysql-server mysql-client)

I then manually removed the directories:


I rebooted. But when I type mysql, I get the following message:

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

I get the same error message when I type service mysql stop

This means mysql server is still running. How do I get rid of it completely and stop the process. My OS is Ubuntu 12.04 server.

share|improve this question
Sounds like the process isn't running based on the can't connect message – Ramhound Apr 10 '14 at 23:33
What makes you think that the error indicates that MySQL server is running? – Oliver Salzburg Apr 10 '14 at 23:48
up vote 1 down vote accepted

The mysql-server mysql-client are meta-packages that link to packages like mysql-server-5.5 mysql-client-5.5. If you uninstalled the meta packages, and not the version specific packages, then mysql is still installed.

share|improve this answer

You should check with dpkg -l that you don't have any mysql packages installed on the server. There seems to be some MySQL utility left that tries to connect to your server. Remove all the mysql packages with apt-get and you should be able to boot cleanly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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