查看linux上是否已经安装了mysql,有则卸载。
一般centos7默认安装了mariadb,这里把它卸载。
查看:[root@localhost bin]# rpm -qa|grep mariadb
卸载:[root@localhost bin]# rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64
8.0.37安装客户端顺序为
#先安装好各种依赖
yum -y install net-tools perl perl-devel perl-JSON.noarch autoconf libaio libaio-devel ncurses-devel numactl.x86_64
#再装common包
yum localinstall mysql-community-common-8.0.37-1.el7.x86_64.rpm
#community-libs要加 --nodeps --force 参数
rpm -ivh mysql-community-libs-8.0.37-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-plugins-8.0.37-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-8.0.37-1.el7.x86_64.rpm
#再装一下兼容性包
yum localinstall mysql-community-libs-compat-8.0.37-1.el7.x86_64.rpm