AlmaLinux 8.6 + Plesk: Updating MariaDB 10.3 to 10.5

Quick guide on how to update MariaDB 10.3 to 10.5 when using AlmaLinux 8.6 with Plesk Obsidian. This is using a clean install of Plesk Obsidian 18.0.46 and is correct at time of publishing.

Stop MariaDB service

service mariadb stop

Remove incompatible gssapi package

dnf remove mariadb-gssapi-server

Edit/create mariadb.repo in /etc/yum.repos.d/ with the following (I use nano but any editor will do)

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

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/rhel8-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Ctrl + X to save and quit, Y then enter.

Clean cache and install MariaDB

dnf clean all

dnf install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common

Restart MariaDB

systemctl restart mariadb

Upgrade databases

MYSQL_PWD=cat /etc/psa/.psa.shadow mysql_upgrade -uadmin

Restart MariaDB again

systemctl restart mariadb

Update Plesk MariaDB version

plesk sbin packagemng -sdf

Restore SELinux on /var/lib/mysql/*

restorecon -v /var/lib/mysql/*

You should now have MariaDB 10.5 installed and working replacing 10.3.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.