How to upgrade MariaDB 5.5 to 10.x in CentOS 7 ?
Upgrading MariaDB 5.5 to 10.x on CentOS 7: A Step-by-Step Guide
Overview: This article describes the process for upgrading MariaDB from version 5.5 to 10.x on CentOS 7, covering backup procedures, repository configuration, and installation steps.
Step 1. Before upgrading the MariaDB, create a dump of the Ezeelogin database:
Example:
:~# mysqldump ezlogin_zwpfl > ezlogin_zwpfl_backup.sql -u root -p
Enter password:
:~#ls
ezlogin_zwpfl_backup.sql
You can check the current MariaDB version by
:~# mysql -V
Example:
:~# mysql -V
mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1
To know the list of MariaDB packages before upgradation,
:~# rpm -qa|grep -i mariadb
mariadb-server-5.5.68-1.el7.x86_64
mariadb-5.5.68-1.el7.x86_64
mariadb-libs-5.5.68-1.el7.x86_64
You can get the Ezeelogin db_name from the /usr/local/etc/ezlogin/ez.conf.
For troubleshooting database-related issues in Ezeelogin
Step 2. Stop MariaDB service by the following command:
:~# systemctl stop mariadb.service
Step 3. Before upgrading the MariaDB to 10.x, Create the MariaDB.repo file
:~# vi /etc/yum.repos.d/MariaDB.repo
And add the following lines to upgrade MariaDB to 10.4
# MariaDB 10.4 CentOS repository list
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
Step 4. Start the upgrade of MariaDB
:~# yum install MariaDB-client MariaDB-server -y
Step 5. After it’s finished, start MariaDB:
:~# systemctl restart mariadb.service
:~# systemctl enable mariadb.service
Step 6. Restart MariaDB service:
:~#systemctl restart mariadb.service
After upgrading, check the version by,
:~# mysql -V
mysql Ver 15.1 Distrib 10.4.22-MariaDB, for Linux (x86_64) using readline 5.1
Also, you can check the list of MariaDB packages after upgradation by,
:~# rpm -qa|grep -i mariadb
MariaDB-client-10.4.22-1.el7.centos.x86_64
MariaDB-server-10.4.22-1.el7.centos.x86_64
MariaDB-compat-10.4.22-1.el7.centos.x86_64
MariaDB-common-10.4.22-1.el7.centos.x86_64
Related Articles: