I have a Debian machine that I have previously installed MySQL on. In an attempt to delete it, I stupidly deleted the directories/files /etc/mysql/, /etc/init.d/mysql, /usr/lib/mysql/, /var/lib/mysql/. I then later did sudo apt-get purge mysql-server mysql-server-5.0.

I have tried to search for a solution via Google and have found lots of suggestions for this problem, but ultimately it seems like the problem is that by deleting the files manually, I messed up the mysql-common package.

I have tried to do

sudo apt-get install --reinstall mysql-common

followed by installing mysql-server, but it does the exact same thing.

I previously had MySQL working great, I just want to get it back to that state. Thanks so much for your help.

2 Answers
2

Note that you don't need to purge mysql-server since it's just a meta-package (i.e. it's a convenience package containing just dependency info). Also, pay attention to the output of the purge option. It might display directories that aren't purged, and then you can remove those manually.