Browny's Grotto :: http://www.clan-elite.info/

Completely uninstalling MySQL in Ubuntu

1 pages: [ 1 ] [ View newest post ] Post reply.
I recently had cause to do this and ran into a few of these errors when trying to reinstall:
Bash Script:
/var/lib/dpkg/info/mysql-server-5.0.postinst: line 143: /etc/mysql/conf.d/old_passwords.cnf: No such file or directory
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz
/etc/init.d/mysql: line 122: /etc/mysql/debian-start: No such file or directory

Running the following fixes the issue:
Bash Script:
sudo apt-get autoremove --purge mysql-server mysql-server-5.0 mysql-common
sudo apt-get install mysql-server

For reference, here's what caused my problem in the first place:
Bash Script:
sudo dpkg --purge mysql-server
sudo apt-get autoremove
sudo rm /var/lib/mysql -rf
sudo rm /etc/mysql -rf

It looks like the mysql-common package handles the /etc/mysql directory and its default contents, so removing it manually will bork a reinstallation of the server.
1 pages: [ 1 ] [ View newest post ] Post reply.