Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm not able to install mysql-server on ubuntu 10.04 I had installed mysql but it was giving this error

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

So I removed mysql-server completely from synaptic
but after this i'm not able to reinstall it. When I try to reinstall it synaptic freezes.

how to do remove each file of mysql and install it ?

share|improve this question
apt-get purge mysql-server, should remove everything, config files included. – Ency Jan 2 '11 at 21:47

I usually prefer to use the command line interface. So, I use apt-get to remove/install packages.

You can try removing mysql server including configuration files

$ sudo apt-get --force-yes purge mysql-server

You can then try installing it

$ sudo apt-get install mysql-server
share|improve this answer
I tried to install from apt-get but the installation process stops at "Setting up mysql-server-5.1 (5.1.41-3ubuntu12.8) ..." – Mukesh Yadav Jan 2 '11 at 18:10
Do you mean it just hanged? Is there any error message? – Khaled Jan 2 '11 at 20:20
no error message I put terminal for 30 min, and then killed the session. – Mukesh Yadav Jan 3 '11 at 12:37

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.