Arthur's Blog

Completely uninstall and remove MySQL

9 months ago

Here is how to completely remove mySQL from Linux Mint and Ubuntu.  Might also apply to Debian:

 

  1. Start mysql, if you can't then try sudo mysqld --skip-grant-tables
  2. Exit mysql
  3. sudo rm -rf /var/lib/mysql
  4. Find which packages are installed by running sudo dpkg -S etc/mysql
  5. Remove each of these packages with a sudo apt-get remove.  For example sudo apt-get remove mysql-common mysql-server-5.1
  6. Remove the mysql user:  sudo userdel mysql