使用apt-get install安装的版本,一般通过如下命令进行清除即可.
sudo rm /var/lib/mysql/ -R
删除mysql的数据文件
sudo rm /etc/mysql/ -R
删除mqsql的配置文件
sudo apt-get autoremove mysql* --purge
sudo apt-get remove apparmor
自动卸载mysql的程序
但安装的不是默认版本就需要手动卸载.
依次用dpkg --purge ***
1. mysql-common
2. libmysqlclient20
3. libmysqlclient-dev
4.libmysqld-dev
5. mysql-community-client
6. mysql-client
7. mysql-community-source
8. mysql-community-server
进行卸载
依次用sudo dpkg -i ***
1. mysql-common
2. libmysqlclient20
3. libmysqlclient-dev
4.libmysqld-dev
5. mysql-community-client
6. mysql-client
7. mysql-community-source
8. mysql-community-server
进行安装