CentOS7的yum源中默认是没有mysql的,我们需要要先下载mysql的repo源。
1、下载mysql的repo源
wget http://repo.mysql.com/yum/mysql-8.0-community/el/7/x86_64/mysql57-community-release-el7-9.noarch.rpm
2、安装mysql57-community-release-el7-9.noarch.rpm包
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
3、修改MySQL的repo源,使MySQL8.0可用
vi /etc/yum.repos.d/mysql-community.repo
[