Backup your database(s) using your preferred method. (For this tutorial, we’ll just use mysqldump. Also be sure to make a copy of your configuration file(s).)
mysqldump --all-databases > /tmp/backup.sql
cp /etc/my.cnf{,.bak}Stop MySQL Service
service mysql stopMake a copy of the data directory just in case.
cp -R /var/lib/mysql /tmp/mysql_backupConfigure the MariaDB 5.5 Repository.
vim /etc/yum.repos.d/MariaDB55.repoPaste the MariaDB 5.5 yum repository entry into /etc/yum.repos.d/MariaDB55.repo
# MariaDB 5.5 CentOS repository list - created 2020-10-21 16:47 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1Clean the Repository Cache Information
yum clean allRemove MySQL 5.1
yum remove mysql-serverInstall MariaDB 5.5
yum install mysql-serverStart MySQL Service
service mysql startUpgrade the Database
mysql_upgradeCheck Upgrade and Verify Databases
mysql --versionmysql -uroot -pSHOW DATABASES;Stop mysql Service & Remove MariaDB 5.5
service stop mysql
yum remove mysql-server mysql-clientDisable the MariaDB 5.5 Repo
mv /etc/yum.repos.d/MariaDB55.repo{,.disabled}Configure the MariaDB 10.x Repository
vim /etc/yum.repos.d/MariaDB10.repoPaste the MariaDB 10.x yum repository entry into /etc/yum.repos.d/MariaDB55.repo
# MariaDB 10.3 CentOS repository list - created 2020-10-21 16:59 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1Clean the Repository Cache Information
yum clean allInstall MariaDB 10.x
yum install mysql-server mysql-clientStart mysql Server & Fix /var/log/mysqld.log
touch /var/log/mysqld.log && chown mysql:mysql /var/log/mysqld.log
service mysql startUpgrade the Database
mysql_upgradeCheck Upgrade & Verify Databases
mysql --versionmysql -uroot -pSHOW DATABASES;