# 查找linux自带的数据库
rpm -qa | grep mariadb
#删除自带的数据库 mariadb
rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64
#依次安装
rpm -ivh mysql-community-common-5.7.24-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.24-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.24-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.24-1.el7.x86_64.rpm
ps:
---------------------------------------------------------------------
这里出现的错误
# error: Failed dependencies:
/usr/bin/perl is needed by mysql-community-server-5.7.24-1.el7.x86_64
net-tools is needed by mysql-community-server-5.7.24-1.el7.x86_64
perl(Getopt::Long) is needed by mysql-community-server-5.7.24-1.el7.x86_64
perl(strict) is needed by mysql-community-server-5.7.24-1.el7.x86_64
解决方法:
$ yum install -y perl-Module-Install.noarch
# error: Failed dependencies:
n