环境
旧版:mariadb-5.5
新版:mariadb-10.1
mysqldump -uroot -p --skip-lock-table --events --all-databases > /data/all.dump
yum remove mariadb-server
rm -f /etc/my.cnf
rm -rf /var/lib/mysql/
配置mariadb的yum源
vim /etc/yum.repo.d/mariadb.repo
[mariadb]name = MariaDBbaseurl = https://mirrors.aliyun.com/mariadb/yum/10.1/redhat7-amd64/gpgkey=https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDBgpgcheck=1
安装
yum -y install MariaDB-server galera MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common
启动并配置开机自启
systemctl start mariadb.service
systemctl enable mariadb.service
/usr/bin/mysql_secure_installation
mysql -uroot -p < /data/all.dump
mysql_upgrade -uroot -p
至此升级完成
https://mariadb.com/kb/en/upgrading-from-mariadb-55-to-mariadb-100/