第一种方式卸载:yum卸载
查看yum是否安装过mysql
yum list installed mysql*
yum命令卸载
yum remove MySQL-client MySQL-devel MySQL-embedded MySQL-server MySQL-shared MySQL-shared-compat MySQL-test rm -rf /var/lib/mysql rm /etc/my.cnf
第二种方式卸载:rpm卸载
rpm查看安装
rpm -qa | grep -i mysql
rpm 卸载
rpm -e mysql57-community-release-el7-9.noarch rpm -e mysql-community-server-5.7.17-1.el7.x86_64 rpm -e mysql-community-libs-5.7.17-1.el7.x86_64 rpm -e mysql-community-libs-compat-5.7.17-1.el7.x86_64 rpm -e mysql-community-common-5.7.17-1.el7.x86_64 rpm -e mysql-community-client-5.7.17-1.el7.x86_64 cd /var/lib/ rm -rf mysql/
清除余项
whereis mysql mysql: /usr/bin/mysql /usr/lib64/mysql /usr/local/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz
删除上面的文件夹
rm -rf /usr/bin/mysql
删除配置
rm –rf /usr/my.cnf rm -rf /root/.mysql_sercret
剩余配置检查
chkconfig --list | grep -i mysqlchkconfig --del mysqld
以上是Centos-mysql卸载的详细内容。更多信息请关注PHP中文网其他相关文章!