Ubuntu can't completely remove and install MySQL problem

Ubuntu can't completely remove and install MySQL problem

The installation usually exits unexpectedly, or it is difficult to delete MySQL and install it again, except for problems during the operation of MySQL. After experiments, the following steps can effectively solve the above problems.

首先删掉 /etc/mysql 和 /var/lib/mysql 这两个文件夹,这里存放的是MySQL的配置文件
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql

sudo apt-get autoremove mysql-server* --purge
图形界面确认删除

sudo apt-get autoclean

sudo apt-get remove apparmor

再从新安装MySQL

Guess you like

Origin blog.csdn.net/qq_27198345/article/details/109392937