参考:
https://blog.csdn.net/qq_37130607/article/details/105854301
卸载原来的MySQL
rpm -qa |grep mysql
rpm -e 软件包名称
下载mysql的rpm
wget http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
修改repo文件(安装5.7,不要8.0)
cd /etc/yum.repos.d/
vi mysql-community.repo
yum -y install mysql-community-server
mysql --version
systemctl start mysqld.service
systemctl status mysqld.service
grep "password" /var/log/mysqld.log
No match for argument: mysql-community
错误:没有任何匹配: mysql-community
问题2:
错误:Transaction test error: file /etc/my.cnf from install of mysql-community-server-5.7.34-1.el7.x86_64 conflicts with file from package mariadb-connector-c-config-3.1.11-2.el8_3.noarch
解决方法:
[#zeyu#]
问题1:
1、运行命令
yum module disable mysql
yum -y install mysql-community-server
问题2:
yum -y remove mariadb-connector*
[/#zeyu#]