Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have been having trouble with my MySql setup. This morning it was a working mysql server I added a database and some data with phpMyAdmin then things started to go wrong.

I became unable to connect getting ERROR 2002 unable to connect to socket.

I have completley unistalled mysql server (as best I can) and deleted database files. And now I cannot reinstall it. I get a dpkg error "post-instalation script returned error exit status 1".

Running dpkg-reconfigure reports that "mysql-server-5.1 is broken or not fully installed" how do I find out what it is looking for?

The only thing I have removed is the mysql-server packages, I did install vsftpd at some point shortly before MySql stopped woking, is this known to break MySql??

Any thoughts apreciated

share|improve this question
up vote 2 down vote accepted

Check what packages of myslq are/is still installed:

sudo dpkg -l | grep mysql*

To completely remove remaining mysql packages do:

sudo dpkg -P mysql*

share|improve this answer

you should take a look at this site. it had been critized before ...

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – hexafraction Aug 17 '12 at 0:01

To remove broken packages of mysql or similar use following : sudo apt-get autoremove and sudo apt-get autoclean. Now try to make fresh installation again for mysql.

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.