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

3 Answers 3


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*


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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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