mysql-ubuntu16.04 completely uninstall mysql

delete mysql data file

sudo rm /var/lib/mysql/ -R

delete mysql configuration file

sudo rm /etc/mysql/ -R

Automatically uninstall mysql (including server and client)

sudo apt-get autoremove mysql* --purge 
sudo apt-get remove apparmor

Check if uninstall is clean

dpkg -l | grep mysql # 若没有返回,说明已完成卸载

The installation is then a simple matter

sudo apt-get install mysql-server mysql-client

In this way, the version of mysql 5.5 is installed by default, and then try to install mysql 5.7, and add the installation of 5.7 later.

forward from:

https://blog.csdn.net/qq_25730711/article/details/53503959

The test passed on ubuntu16.04

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325985961&siteId=291194637