美文网首页
Linux 卸载Mysql

Linux 卸载Mysql

作者: Frankeen | 来源:发表于2019-08-08 14:23 被阅读0次

1: 卸载前关闭MySQL服务

[root@localhost mysql]#systemctl stop mysql

2: 检查安装了MySQL组件,并卸载

[root@localhost mysql]# rpm -qa | grep -i mysql
mysql-community-server-5.7.23-1.el7.x86_64
mysql-community-client-5.7.23-1.el7.x86_64
mysql-community-libs-5.7.23-1.el7.x86_64
mysql-community-devel-5.7.23-1.el7.x86_64
mysql-community-common-5.7.23-1.el7.x86_64
mysql-community-libs-compat-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-server-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-client-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-libs-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-devel-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-common-5.7.23-1.el7.x86_64
[root@localhost init.d]# rpm -ev mysql-community-libs-compat-5.7.23-1.el7.x86_64

3: 收集MySQL对应的文件夹信息并删除

[root@localhost init.d]# whereis mysql
mysql: /usr/share/mysql
[root@localhost init.d]# rm -rf /usr/share/mysql
[root@localhost init.d]# find / -name mysql
/var/lib/mysql
/var/lib/mysql/mysql

开源一个微信公众号留言小程序,欢迎大家Fork:
https://github.com/fuxingkai/LMsg

相关文章

网友评论

      本文标题:Linux 卸载Mysql

      本文链接:https://www.haomeiwen.com/subject/kyfadctx.html