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

 

SeeHow to Change MySQL user password in Linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.