centos7 更新mariadb
1. 备份数据库内容
mysqldump -uroot -p --all-databases > /opt/database-dump.sql
2. 停止mysql并清除(前提是备份好数据库内容)
systemctl stop mariadb
yum remove mariadb mariadb-server mariadb-libs
3. 添加mariadb下载源
vi /etc/yum.repos.d/mariadb.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
4. 清理yum缓存
yum clean all
5. 下载
yum install MariaDB-client MariaDB-server