CentOS7 完全卸载yum 安装 mysql
2022/2/20 19:37:51
本文主要是介绍CentOS7 完全卸载yum 安装 mysql,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
CentOS7 完全卸载yum 安装 mysql
-
检查 rpm 包
rpm -qa |grep -i mysql # 运行结果 mysql-community-libs-5.7.37-1.el7.x86_64 mysql57-community-release-el7-10.noarch mysql-community-server-5.7.37-1.el7.x86_64 mysql-community-common-5.7.37-1.el7.x86_64 mysql-community-libs-compat-5.7.37-1.el7.x86_64 mysql-community-client-5.7.37-1.el7.x86_64
-
卸载 rpm
yum remove mysql-community-libs-5.7.37-1.el7.x86_64 yum remove mysql57-community-release-el7-10.noarch yum remove mysql-community-server-5.7.37-1.el7.x86_64 yum remove mysql-community-common-5.7.37-1.el7.x86_64 yum remove mysql-community-libs-compat-5.7.37-1.el7.x86_64 yum remove mysql-community-client-5.7.37-1.el7.x86_64
-
重新检查应为空
rpm -qa |grep -i mysql
-
查找 mysql 相关目录
find / -name mysql # 运行结果 /etc/selinux/targeted/active/modules/100/mysql /etc/selinux/targeted/tmp/modules/100/mysql /var/lib/mysql /var/lib/mysql/mysql /usr/share/mysql
-
逐一删除
rm -rf /var/lib/mysql rm -rf /var/lib/mysql/mysql rm -rf /usr/share/mysql rm -rf /etc/selinux/targeted/tmp/modules/100/mysql rm -rf /etc/selinux/targeted/active/modules/100/mysql
-
删除配置文件
rm -rf /etc/my.cnf
-
删除安装日志,防止重新安装无法记录密码
rm -rf /var/log/mysqld.log
这篇关于CentOS7 完全卸载yum 安装 mysql的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-25如何部署MySQL集群资料:新手入门教程
- 2024-12-24MySQL集群部署资料:新手入门教程
- 2024-12-24MySQL集群资料详解:新手入门教程
- 2024-12-24MySQL集群部署入门教程
- 2024-12-24部署MySQL集群学习:新手入门教程
- 2024-12-24部署MySQL集群入门:一步一步搭建指南
- 2024-12-07MySQL读写分离入门:轻松掌握数据库读写分离技术
- 2024-12-07MySQL读写分离入门教程
- 2024-12-07MySQL分库分表入门详解
- 2024-12-07MySQL分库分表入门指南