Updating MariaDB version

Hi there

I’m moving from Centos 7 to AlmaLinux 9 so you’ll have to forgive my ignorance.

I have a brand new AlmaLinux 9.4 installation with my hosting company and it appears to have been pre-installed with a LAMP stack.

The MariaDB server version currently running is MariaDB 10.5.22 but I notice the release notes for AlmaLinux 9.4 mention an updated module stream to MariaDB 10.11

I am wondering how I can upgrade MariaDB.

Doing dnf update and dnf upgrade tells me there is nothing to do.

Doing dnf search mariadb lists a bunch of MariaDB stuff, but doesn’t actually say the version.

Obviously doing dnf install mariadb tells me Package mariadb-3:10.5.22-1.el9_2.alma.1.x86_64 is already installed

So how would I upgrade MariaDB to the later version of MariaDB 10.11, but still stick with a package officially supported and maintained by AlmaLinux?

DNF repos can have modularity. Packages belonging to a module are visible only when that module (aka stream) is enabled:

$ sudo dnf module list mariadb
AlmaLinux 9 - AppStream
Name                    Stream                 Profiles                                   Summary                       
mariadb                 10.11                  client, galera, server [d]                 MariaDB Module                

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

$ sudo dnf list mariadb
Installed Packages
mariadb.x86_64                                    3:10.5.22-1.el9_2.alma.1                                    @appstream

$ sudo dnf module enable mariadb:10.11
Dependencies resolved.
========================================================================================================================
 Package                     Architecture               Version                       Repository                   Size
========================================================================================================================
Enabling module streams:
 mariadb                                                10.11                                                          

Transaction Summary
========================================================================================================================

Is this ok [y/N]: y
Complete!

$ sudo dnf list mariadb
Installed Packages
mariadb.x86_64                             3:10.5.22-1.el9_2.alma.1                                           @appstream
Available Packages
mariadb.x86_64                             3:10.11.6-1.module_el9.4.0+98+2f9e4da4                             appstream 

$ sudo dnf module list mariadb
AlmaLinux 9 - AppStream
Name                    Stream                   Profiles                                  Summary                      
mariadb                 10.11 [e]                client, galera, server [d]                MariaDB Module               

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Alma 9 has that 10.5 as regular packages, always visible.
You can enable the 10.11 and then its packages are visible too (and preferred due to version; 10.11 > 10.5)

Red Hat supports the mariadb:10.11 stream up to May 2028 in RHEL 9. They do support the 10.5 to May 2032. See Red Hat Enterprise Linux Application Streams Life Cycle - Red Hat Customer Portal
It is likely that there will be an another mariadb stream (newer than 10.11) at some point.

2 Likes

Thank you so much @jlehtone for your comprehensive reply, it worked!

As a follow up question, the current PHP version is 8.0 but again I see that version 8.2 is available so I am guessing I can follow the same process here. However, I would like to run PHP 7.4 and PHP 8.2 concurrently due to some legacy applications that haven’t yet been updated to run on version 8.x yet. In the past I have achieved this using Remi’s repository which allows me to install multiple versions.

Is there a way of running PHP 8.2 from the AlmaLinux repo and also running PHP 7.4 from Remi’s repo? Or would I be better just using Remi for both?

Thanks,

The module streams follow the idea that there is only one active stream. Each alternative stream has packages with same name, and files with same name within.

@remi is the authority on whether to use PHP 8.2 from his repo, or the Alma’s version.