MariaDB安装

字数 100阅读 54

https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.2

1. 配置Yum安装库

Here is your custom MariaDB YUM repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d/ (we suggest naming the file MariaDB.repo or something similar).

#MariaDB 10.2 CentOS repository list - created 2017-06-12 03:20 UTC
#http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-
gpgcheck=1

2.执行yum安装

After the file is in place, install MariaDB with:

sudo yum install MariaDB-server MariaDB-client

3.启动MariaDB

systemctl start mariadb

4.设置root用户密码

mysqladmin -u root -p password newpassword

后面的 newpassword是要设置的密码

推荐阅读更多精彩内容