删除原来的
rpm -qa | grep -i mysql
rpm -qa | grep maria
rpm -e --nodeps mysql-community-libs-5.6.51-2.el7.x86_64
sudo rm -rf /etc/my.cnf
sudo find / -name mysql -type d -exec rm -rf {} \;
sudo find / -name mysql -type f -exec rm -rf {} \;
sudo yum makecache
然后按照这个文章安装
https://blog.csdn.net/weixin_42223120/article/details/113148081
然后找密码
https://blog.51cto.com/u_16213689/6980948