MySQL卸载-Linux版

MySQL卸载-Linux版

停止MySQL服务

systemctl stop mysqld

查询MySQL的安装文件

rpm -qa | grep -i mysql

卸载上述查询出来的所有的MySQL安装包

rpm -e mysql-community-client-plugins-8.0.26-1.el7.x86_64 --nodeps

rpm -e mysql-community-server-8.0.26-1.el7.x86_64 --nodeps

rpm -e mysql-community-common-8.0.26-1.el7.x86_64 --nodeps

rpm -e mysql-community-libs-8.0.26-1.el7.x86_64 --nodeps

rpm -e mysql-community-client-8.0.26-1.el7.x86_64 --nodeps

rpm -e mysql-community-libs-compat-8.0.26-1.el7.x86_64 --nodeps

rpm remove mysql-community-libs-compat-8.0.26-1.el7.x86_64

删除MySQL相关文件

find / -name mysql

删除上述命令查找出的相关文件

rm -rf /var/lib/mysql/

删除MySQL的配置文件备份

rm -rf /etc/my.cnf.rpmsave

你可能感兴趣的:(运维,SQL,mysql,linux)