1.先下载mysql5,7 的rpm包:
~]# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
~]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm ==>安装rpm包
2.直接yum安装
~]# yum -y install wget
3.启动服务,设置开机启动服务
~]# systemctl start mysqld
~]#systemctl enable mysqld
4.查看服务状态;
~]# systemctl status mysqld
结果如图所示:active running 代表启动成功