可以指定版本,如8.0.11,8.0.12,8.0.13,8.0.14,8.0.15,8.0.16
添加mysql yum repository
mysql80-community-release-el7-3.noarch.rpm
yum-config-manager --enable mysql80-community
yum repolist enabled | grep mysql
yum clean all
yum makecache
yum install mysql-community-server -y
yum install mysql-community-client mysql-community-devel mysql-community-libs mysql-community-server mysql-community-common --skip-broken -y
systemctl start mysqld.service
禁止自动更新
tail -1 /etc/yum.conf
exclude=mysql-community-*
centos6同centos7,安装就是yum repository不一样,如mysql80-community-release-el6-3.noarch.rpm