Upgrade MariaDB Version On AlmaLinux 8 with CWP


Upgrade Default Installed MariaDB 10.4 To A Newer Version on AlmaLinux 8 With CWP Installed


As this KB article still works on on AlmaLinux 8, we also have created an updated one for both AlmaLinux 8 & 9 at:

Upgrade MariaDB 10.x to 10.11 In CWP On AlmaLinux 8 – Starburst Services Knowledge Base

Upgrade MariaDB 10.x to 10.11 In CWP On AlmaLinux 9 – Starburst Services Knowledge Base


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.


Check which version of MariaDB is installed on your server:

rpm -qa|grep -i maria

MariaDB Repository Changes

Goto: https://mariadb.org/download/?t=repo-config&d=Red+Hat+Enterprise+Linux+8
Select the version and Country you want.

Modify repo file to the version you want to upgrade:

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

Replace all the data with:

[mariadb]
name = MariaDB
# rpm.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
baseurl = https://rpm.mariadb.org/10.11/rhel/$releasever/$basearch
module_hotfixes = 1
gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck = 1

Using Nano Editor: Save using Ctrl-O, then Exit using Ctrl-X

Stop and remove the old version of MariaDB (Databases will not be removed)

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

Install the new version of MariaDB

dnf clean all
dnf update "MariaDB-*" -y
dnf install MariaDB-server -y
systemctl enable mariadb
service mariadb start
mysql_upgrade

Verify upgraded packages

rpm -qa|grep -i maria

The output should look like this (10.4.x should be replaced with your new version)

MariaDB-server-10.11.6-1.el8.x86_64
MariaDB-common-10.11.6-1.el8.x86_64
MariaDB-client-10.11.6-1.el8.x86_64
MariaDB-shared-10.11.6-1.el8.x86_64

Congrats, you are ready to go.


Did you found this Knowledge Base Article useful?

Please considering thanking our SysOp Team.


KB Article Written: 2023-11-24
Original Wiki Written: 2022-02-15 by CWP
https://wiki.centos-webpanel.com/mariadb-upgrade-to-new-version

people found this article helpful. What about you?