centos7 使用国内源mariadb

安装mariadb数据库

vim /etc/yum.repos.d/MariaDB.repo

[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.4/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

rpm –import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

yum安装MariaDB

yum -y install MariaDB-server MariaDB-client

重启maridb服务

systemctl start mariadb
systemctl enable mariadb

数据库安全设置

mysql_secure_installation

正文完
 0