ubuntu14下彻底卸载Mysql,各种错误彻底解决的方法

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/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

sudo apt-get autoremove --purge mysql-server-5.5 sudo apt-get autoremove mysql-client sudo apt-get autoremove mysql-server sudo apt-get autoremove mysql-common 清除残留数据和配置信息 dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

删删删,删到它爹娘都不认得,现在可以执行安装了:

sudo apt-get install mysql-server mysql-client


搞定

打赏

发表评论

电子邮件地址不会被公开。 必填项已用*标注