Uninstalling MySQL

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US
  1. Ensure that the database backup performed earlier has completed successfully and that you are able to locate the database backup file.
  2. Stop Tomcat by executing the following command:
    service mysql stop
  3. Verify that the MySQL service is stopped by executing the following command:
    service mysql status

    If the command returns "Active: inactive (dead)", the MySQL service is stopped.

    Important:

    Do not continue with the steps in this workflow if the above command does not report that MySQL is stopped. Repeat steps 2 and 3 if necessary.

  4. Uninstall MySQL by executing the following commands:
    sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
    sudo apt-get autoremove -y
    sudo apt-get autoclean
  5. Remove the /etc/mysql/ directory and its subdirectories by executing the following command:
    sudo rm -rf /etc/mysql/