How to Uninstall MySQL in Ubuntu Linux

The MySQL is the open source Database system available for Linux and can be installed on Windows too. The reason forĀ removing or uninstalling the MySQL server completely could be different from user to user but the commands to perform will be the same on Linux.

How to Uninstall MySQL in Ubuntu Linux

Here are the commands to uninstall MySQL database server from Ubuntu orĀ Debian based Linux systems:

  1. sudo service mysql stop
  2. sudo apt-get remove --purge mysql*
  3. sudo apt-get autoremove
  4. sudo apt-get autoclean
  5. sudo rm -rf /var/lib/mysql
  6. sudo rm -rf /etc/mysql

 

See:Ā How to Change MySQL user password in Linux