https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna&distro=CentOS&distro_release=centos7-amd64–centos7&version=10.2
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
After the file is in place, install MariaDB with:
sudo yum install MariaDB-server MariaDB-client
systemctl start mariadb
mysqladmin -u root -p password newpassword
后面的 newpassword是要设置的密码