1、配置mysql下载源
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm # 下载源安装包
yum localinstall mysql57-community-release-el7-8.noarch.rpm
# 安装mysql源安装包
yum repolist enabled | grep "mysql.*-community.*"
# 检查是否安装成功
这样就表示安装成功
2、安装mysql
yum install mysql-community-server
3、启动mysql
systemctl start mysqld
查看mysql的启动状态
systemctl status mysqld
转载于:这里