When we want to uninstall mysql after installing mysql, the uninstallation is often incomplete, causing problems with the next installation. The following provides a method for ubuntu to uninstall mysql completely.
Reminder: Be sure to confirm whether the data in the database is backed up before execution, the data is priceless!
sudo apt-get autoremove --purge mysql-server*
sudo apt-get remove mysql-server*
sudo apt-get autoremove mysql-server*
sudo apt-get remove mysql-common
sudo rm -rf /etc/my.cnf
#! /bin/bash
list=`sudo find / -name mysql*`for i in $list
do
sudo rm -rf $i
done
exit 0
sudo chmod u+x deleteMysql.sh
sudo ./deleteMysql.sh
Now mysql should be completely uninstalled, and then you can run away (by mistake)!!!∑(゚Д゚ノ)ノ
Recommended Posts