CentOS7使用yum安装MySQL8
1、下载MySQL的repo源
wget https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
2、安装MySQL源
rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
3、安装公钥
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
4、使用yum安装
yum install -y mysql-community-server
##如果只想安装客户端,执行下面依据就行
yum install -y mysql-community-client