操作系统:centos7.1
数据库版本:mysql5.7.21 社区版
1.下载rpm包
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
2.直接yum安装
yum install mysql-community-server -y
3.开启
systemctl start mysqld;systemctl enable mysqld
4.查看状态
systemctl status mysqld