彻底卸载mysql:
卸载mysql安装包yum remove mysql mysql-server mysql-libs compat-mysql51
yum remove mysql-community-release
rpm -e --nodeps mysql-community-libs-5.7.22-1.el7.x86_64
rpm -e –nodeps mysql57-community-release-el7-11.noarch
删除残留的mysql目录或文件:
查询mysql安装目录whereis mysqlfind / -name mysql
删除查询出的目录:rm -rf /usr/lib64/mysql
rm -rf /usr/share/mysql
rm -rf /usr/bin/mysql
rm -rf /etc/logrotate.d/mysql
rm -rf /var/lib/mysql
rm -rf /var/lib/mysql/mysql
删除mysql 配置文件rm –rf /usr/my.cnf
rm -rf /root/.mysql_sercret