centos8 下彻底卸载mysql

centos 8 下卸载mysql

一:查看mysql安装了哪些东西。rpm -qa |grep -i mysql

执行完后显示安装了这些mysql-community-release-el7-5.noarch

mysql-errmsg-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

mysql-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

mysql-server-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

二:对这些一个个的进行卸载,采用 yum remove 命令yum remove mysql-community-release-el7-5.noarch

yum remove mysql-errmsg-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

yum remove mysql-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

yum remove mysql-server-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

yum remove mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64

三:再次使用命令,查看是否卸载干净。rpm -qa |grep -i mysql

四:查找mysql相关目录。find / -name mysql

centos8 下彻底卸载mysql_第1张图片

对这些目录一个个的进行删除。rm -rf /var/lib/selinux/targeted/active/modules/100/mysql

rm -rf /var/lib/mysql

rm -rf /var/log/mysql

rm -rf /usr/share/bash-completion/completions/mysql

rm -rf /usr/share/selinux/packages/mysql

rm -rf /usr/share/selinux/targeted/default/active/modules/100/mysql

五:删除/etc/my.cnf 文件rm -rf /etc/my.cnf

六:删除 /var/log/mysql/mysqld.log文件。rm -rf /var/log/mysql/mysqld.log

转载于:https://blog.csdn.net/weixin_35225189/article/details/113550979?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_baidulandingword-3&spm=1001.2101.3001.4242

你可能感兴趣的:(#,Django开发,#,mysql,mysql,django,python)