- Ensure that the database backup performed earlier has completed successfully and that you are able to locate the database backup file.
- Stop Tomcat by executing the following command:
service mysql stop - Verify that the MySQL service is stopped by executing the following command:
service mysql statusIf 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.
- 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 - Remove the /etc/mysql/ directory and its subdirectories by executing the following command:
sudo rm -rf /etc/mysql/