1.下载mysql官方rpm # 下载地址 https://dev.mysql.com/downloads/ # 选择 MySQL Yum Repository # 我这里下载的是5.7版本的 wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm 2.安装rpm及mysql服务 yum -y install mysql57-community-release-el7-10.noarch.rpm yum -y install mysql-community-server 3.启动Mysq