- 在MariaDB官网找到对应系统版本的repo
https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distro_release=centos7-amd64--centos7&mirror=nethub&version=10.4
新增 /etc/yum.repo.d/MariaDB.repo
# MariaDB 10.4 CentOS repository list - created 2020-04-15 02:50 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
- 安装
yum install MariaDB-server MariaDB-client -y
- 启动服务后的安全配置
mysql_secure_installation