一、Linux下安装mysql
1.安装mysql前准备,卸载mariadb
(1) 查询一下mariadb的相关包
rpm -qa | grep mariadb
CentOS7.7最小版默认安装了mariadb-lib库,而mysql-5.7不兼容这个库,需要将其卸载
(2)卸载查询到的mariadb
rpm -e --nodeps mariadb-libs-5.5.65-1.el7.x86_64
加–nodeps 强制卸载
2.安装mysql
(1)官网下载rpm包(以5.7.28版本为例)
https://downloads.mysql.com/archives/community/
如下选择,下载rpm包:
mysql-community-common-5.7.28-1.el7.x86_64.rpm
mysql-community-libs-5.7.28-1.el7.x86_64.rpm
mysql-community-client-5.7.28-1.el7.x86_64.rpm
mysql-community-server-5.7.28-1.el7.x86_64.rpm