1.配置安装源
#配置MySQL5.7的安装源
#https://repo.mysql.com/mysql57-community-release-el7.rpm
#https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
rpm -Uvh https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
#安装MySQL 5.7社区版服务以及客户端工具
yum --enablerepo=mysql57-community install -y mysql-community-server
#配置MySQL8.0的安装源
#https://repo.mysql.com/mysql80-community-release-el7.rpm
#https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
rpm -Uvh https://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
2. 安装mysql-router:
yum install mysql-router -y