下载mysql yum源
wget https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
安装源
rpm -ivh mysql80-community-release-el7-1.noarch.rpm
mysql yum源不检查秘钥
sed -i 's#gpgcheck=1#gpgcheck=0#g' /etc/yum.repos.d/mysql-community.repo
安装mysql server
yum install mysql-community-server -y
启动mysql
systemctl start mysqld
查找mysql密码
登录mysql
mysql -uroot -p