centos7自带了MariaDB,是mysql的分支,如果我们安装了mysql 会自动替代MariaDB
rpm -qa|grep mariadb
下载MySQL官方的 Yum Repository
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
安装Yum Repository
yum -y install mysql57-community-release-el7-10.noarch.rpm
开始安装mysql
yum -y install mysql-community-server
如下图所示 安装成功
启动mysql服务
systemctl start mysqld.service