重庆思庄Oracle、Redhat认证学习论坛

标题: Linux系统下mysql的彻底卸载步骤 [打印本页]

作者: jiawang    时间: 2024-9-4 10:01
标题: Linux系统下mysql的彻底卸载步骤

1、查看mysql的安装情况
[root@70_12-mysql ~]# rpm -qa | grep -i mysql
mysql-community-icu-data-files-8.2.0-1.el7.x86_64
mysql-community-devel-8.2.0-1.el7.x86_64
mysql-community-server-8.2.0-1.el7.x86_64
mysql-community-common-8.2.0-1.el7.x86_64
mysql-community-libs-8.2.0-1.el7.x86_64
mysql-community-client-8.2.0-1.el7.x86_64
mysql-community-client-plugins-8.2.0-1.el7.x86_64
[root@70_12-mysql ~]#



2、删除已安装的软件
[root@70_12-mysql ~]# rpm -ev mysql-community-libs-8.2.0-1.el7.x86_64 --nodeps
Preparing packages...
mysql-community-libs-8.2.0-1.el7.x86_64



3、查找相关的mysql文件
[root@70_12-mysql ~]# find / -name mysql
/etc/logrotate.d/mysql
/etc/selinux/targeted/active/modules/100/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/bin/mysql
/usr/lib64/mysql
/usr/include/mysql
/usr/include/mysql/mysql
/usr/local/mysql
[root@70_12-mysql ~]#

4、删除全部文件
[root@70_12-mysql ~]# rm -rf /var/lib/mysql
[root@70_12-mysql ~]# rm -rf /var/lib/mysql/mysql
[root@70_12-mysql ~]# rm -rf /var/bin/mysql
[root@70_12-mysql ~]# rm -rf /usr/lib64/mysql
[root@70_12-mysql ~]# rm -rf /usr/include/mysql
[root@70_12-mysql ~]# rm -rf /usr/include/mysql/mysql
[root@70_12-mysql ~]# rm -rf /usr/local/mysql


5、再次执行检查
rpm -qa | grep -i mysql
#如果没有显式则表示卸载完成










欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2