Upgrade Mariadb 5.* to 10.2.9, the official source download is slow, change to domestic mirror source
1. Stop the original service
systemctl stop mariadb
2. Add mariadb installation source
touch /etc/yum.repos.d/MariaDB.repo vim /etc/yum.repos.d/MariaDB.repo add content [mariadb] name = MariaDB baseurl = http://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.2.9/yum/centos7-amd64/ gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
3. Uninstall the old version
yum remove mariadb-server mariadb mariadb-lib yum clean all
4. Install Mariadb
yum install MariaDB-server MariaDB-client
5. Start the service
systemctl start mysql.service
6. Verify
mysql -uroot -p
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 21
Server version: 10.2.9-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.