Upgrade MariaDB 10.x to 10.11 In CWP On AlmaLinux 8


Thanks to Sandeep at Alpha GNU for writing the KB article that this one on based on.

It also can replace our KB Article: Upgrade MariaDB Version On AlmaLinux 8 with CWP


READ ME FIRST

This article is provided as a courtesy.
Installing, configuring, and troubleshooting third-party applications is outside the scope of basic support provided by Starburst Services.

We are not liable for any damages and/or data loss.


REQUIRMENTS

  • SSH credentials or File Manager access Logged In as Root
  • Text Editor (we use nano in this article, but you can use any editor you are comfortable with)
  • EPEL Repository Installed

STEP 1

Before installing it is recommended to backup your databases, although it is not necessary if you followed this steps carefully.

First backup your current my.cnf config :

cp /etc/my.cnf /etc/my.cnf.bak

STEP 2

Remove the currently install MariaDB.

systemctl stop mariadb mysql mysqld
systemctl disable mariadb
rpm --nodeps -ev MariaDB-server

At this point MariaDB 10.0/10.1/10.2/10.3.10.xx will be removed completely but the databases are not removed don’t need to worry.

But you always want to have a server snapshot or backup, BEFORE performing any major updates.


STEP 3

Now edit/create the Repo file:

Ensure you don’t have any other MariaDB repo file in /etc/yum.repos.d if exists delete or backup the existing repo file.

mv /etc/yum.repos.d/mariadb.repo /etc/yum.repos.d/mariadb.repo.bak

Goto the following URL to create your NEW Repo file data.

https://mariadb.org/download/?t-repo-config

Choose a distribution: Red Hat Enterprise Linux 8 (To Match your version of AlmaLinux)

Choose a MariaDB Server version: 10.11 (You can select another verion here, but as of the writing of this artcle 10.11 is the latest LTS)

Mirror: [Select the closest mirror to your location] – (Note, you will see some Starburst Services Mirrors listed)

Cut & paste the data generated into your NEW /etc/yum.repos.d/MariaDB.repo

nano /etc/yum.repos.d/MariaDB.repo

If using nano.
To save file : Ctrl-O
To exit : Ctrl-X


STEP 4

After that update Mariadb 10.11 :

dnf clean all
dnf install MariaDB-server MariaDB-client net-snmp perl-DBD-MySQL -y
dnf --refresh update -y

STEP 5

Backup the new my.cnf config and Restore the original my.cnf file :

cp /etc/my.cnf /etc/my.cnf.NEW
rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf

Then enable mariadb to start on boot and start the service :

systemctl enable mariadb
service mariadb start

STEP 6

After Installation we need to upgrade current databases by this command :

mysql_upgrade --force

That’s it you’ve successfully upgraded MariaDB 10.xx to MariaDB 10.11.

You can confirm the version by running this command from terminal ssh :

mysql -V

You should see :

mysql Ver 15.1 Distrib 10.11.8-MariaDB, for Linux (x86_64) using EditLine wrapper


KB Article Created: 2024-06-11
KB Article Updated: 2024-09-01
Modified Original Author’s KB to work on AlmaLinux 8.

Thanks again to Sandeep at Alpha GNU for creating the KB article this one is based on.

You can find his original KB article at:
https://www.alphagnu.com/topic/23-upgrade-mariadb-1011-in-cwp-centos-7-centos-8-stream-almalinux-78-rockylinux-78/

people found this article helpful. What about you?