Uninstall in Linux

from the Artful MySQL Tips List

In the terminal ...
sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
apt-get autoclean
deluser --remove-home mysql
delgroup mysql
rm -rf /etc/apparmor.d/abstractions/mysql 
  /etc/mysql /var/lib/mysql rm -rf 
  /etc/mysql /var/lib/mysql /var/log/mysql* 
  /var/run/mysqld updatedb
Another recommended sequence ...
sudo systemctl stop mysql
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql
sudo apt autoremove
sudo apt autoclean

Last updated 12 Dec 2021

Return to the Artful MySQL Tips page