CentOS 7 下MySQL5.7卸载(YUM)

1.检查是否安装了MySQL组件。
[root@DB-Server ~]# rpm -qa | grep -i mysql
mysql-community-client-5.7.19-1.el7.x86_64
mysql-community-common-5.7.19-1.el7.x86_64
mysql-community-libs-compat-5.7.19-1.el7.x86_64
mysql-community-libs-5.7.19-1.el7.x86_64
qt-mysql-4.8.5-13.el7.x86_64
mysql57-community-release-el7-11.noarch
mysql-community-server-5.7.19-1.el7.x86_64
perl-DBD-MySQL-4.023-5.el7.x86_64
2.卸载前关闭MySQL服务
[root@DB-Server ~]# systemctl stop mysqld
3.删除MySQL对应的文件夹
yum -y remove mysql-community-client-5.7.19-1.el7.x86_64
yum -y remove mysql-community-common-5.7.19-1.el7.x86_64
yum -y remove mysql-community-libs-compat-5.7.19-1.el7.x86_64
yum -y remove mysql57-community-release-el7-11.noarch
yum -y remove mysql-community-server-5.7.19-1.el7.x86_64
4.检查各个MySQL文件夹是否清理删除干净
[root@DB-Server ~]# whereis mysql
mysql:
[root@DB-Server ~]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/lib64/mysql
[root@DB-Server ~]# rm -rf /var/lib/mysql
[root@DB-Server ~]# rm -rf /var/lib/mysql/mysql
[root@DB-Server ~]# rm -rf /usr/lib64/mysql
5.确认MySQL是否卸载删除
[root@DB-Server ~]# rpm -qa | grep -i mysql

您可以选择一种方式赞助本站

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: