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 stop
Make a copy of the data directory just in case.
cp -R /var/lib/mysql /tmp/mysql_backup
Configure the MariaDB 5.5 Repository.
vim /etc/yum.repos.d/MariaDB55.repo
Paste 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=1
Clean the Repository Cache Information
yum clean all
Remove MySQL 5.1
yum remove mysql-server
Install MariaDB 5.5
yum install mysql-server
Start MySQL Service
service mysql start
Upgrade the Database
mysql_upgrade
Check Upgrade and Verify Databases
mysql --version
mysql -uroot -p
SHOW DATABASES;
Stop mysql
Service & Remove MariaDB 5.5
service stop mysql
yum remove mysql-server mysql-client
Disable 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.repo
Paste 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=1
Clean the Repository Cache Information
yum clean all
Install MariaDB 10.x
yum install mysql-server mysql-client
Start mysql
Server & Fix /var/log/mysqld.log
touch /var/log/mysqld.log && chown mysql:mysql /var/log/mysqld.log
service mysql start
Upgrade the Database
mysql_upgrade
Check Upgrade & Verify Databases
mysql --version
mysql -uroot -p
SHOW DATABASES;