一、下载mysql5.7
1.下载地址
mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
2.上传至服务器
3.解压压缩包
解压命令
tar -xvf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
4.依次安装所需要的rpm包
安装前需要卸载mariadb ,不然后面可能有冲突
rpm -e mariadb-libs --nodeps
然后依次执行以下命令
rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm