1、https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.2
open the link above
copy the selected value,
2. Modify the directory
Copy the contents of the selected area above to the file, and choose 64-bit according to your own server.
sudo vi /etc/yum.repos.d/MariaDB.repo
or modify the source
# MariaDB 10.2 CentOS repository list - created 2017-07-15 07:23 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos6-amd64
gpgkey=http://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
3. Installation
sudo yum install MariaDB-server MariaDB-client
Installation takes a little time
4. Start, configure MariaDB
The configuration method can refer to the configuration of mysql
service mysql start
mysqladmin -u root -p password "mima"