Wednesday, June 23, 2021

Uninstall MySQL On Ubuntu OS

 1. open Terminal and execute below command

sudo systemctl stop mysql

this command will stop mysql service

2. Next run below command

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*

3.Below command will remove MySQL configuration and data.

sudo rm -rf /etc/mysql /var/lib/mysql

 


4.

(Optional) Remove unnecessary packages.

sudo apt autoremove

(Optional) Remove apt cache.

sudo apt autoclean


No comments: