当前最新版本为5.7,此次将分别采用yum安装和tar包编译安装的方式分别说明。
一、Yum安装
A:获取repo源
[root@localhost ~]# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
B:安装该rpm包
[root@localhost ~]#yum localinstall mysql57-community-release-el7-8.noarch.rpm
C:查看是否生效
[root@localhost ~]# yum list | grep mysql | grep server --color
mysql-community-server.x86_64 5.7.19-1.el7 mysql57-community
mysql-server.x86_64 5.1.73-8.el6_8 base
D:安装
[root@localhost ~]# yum install mysql-community-server -y