Upgrade MariaDB to 10.11

Hello everyone,

I’m using Rocky Linux 9.6 and I need to update MariaDB to version 10.11, which is necessary for Joomla 6, the latest release of this CMS I use.

Rocky uses MariaDB 10.5 by default, but it has a module for version 10.11. When I enable this module:

$ dnf module enable mariadb:10.11

Webmin now indicates that I can update:

An update to mariadb from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available

My question is whether I can update from Webmin without any problems while keeping the current databases as they are, since I’ve read some tutorials that say several additional steps are required.

Thanks,

So if you did:

dnf module enable mariadb:10.11

then your second command should have been:

dnf update

or if mariadb is not already installed:

dnf install mariadb-server

Personally I don’t use Webmin, I’ve been bitted before because if it’s peculiarities and it breaking things. That is why Rocky comes with cockpit. Also it’s better to learn to do things properly than rely on tools that try to be clever like webmin.

Thanks iwalker,

I have MariaDB version 10.5 installed and several production domains, hence my question: would updating to version 10.11 affect the databases?

If I run the update from Webmin, these are the packages that would be updated:

An update to mariadb from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

An update to mariadb-backup from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

An update to mariadb-common from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

An update to mariadb-errmsg from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

An update to mariadb-server from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

An update to mariadb-server-utils from 10.5.27-1.el9_5.0.2 to 10.11.10-1.module+el9.6.0+31841+9417776a is available.

However, some say that you first need to remove the previous version of MariaDB and then run, for example, $ mysql_upgrade --force.

A quick test:

root@rocky9:~# rpm -qa | grep -i mariadb-server
mariadb-server-utils-10.5.27-1.el9_5.0.2.x86_64
mariadb-server-10.5.27-1.el9_5.0.2.x86_64

root@rocky9:~# dnf module enable mariadb:10.11
Last metadata expiration check: 0:01:58 ago on Sat 01 Nov 2025 08:52:37 PM CET.
Dependencies resolved.
========================================================================================================================
 Package                     Architecture               Version                       Repository                   Size
========================================================================================================================
Enabling module streams:
 mariadb                                                10.11                                                          

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

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

root@rocky9:~# dnf update -y
Last metadata expiration check: 0:02:17 ago on Sat 01 Nov 2025 08:52:37 PM CET.
Dependencies resolved.
========================================================================================================================
 Package                      Architecture  Version                                              Repository        Size
========================================================================================================================
Upgrading:
 mariadb                      x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream        1.7 M
 mariadb-backup               x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream        6.8 M
 mariadb-common               x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream         27 k
 mariadb-errmsg               x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream        254 k
 mariadb-gssapi-server        x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream         15 k
 mariadb-server               x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream         10 M
 mariadb-server-utils         x86_64        3:10.11.10-1.module+el9.6.0+31841+9417776a           appstream        261 k

Transaction Summary
========================================================================================================================
Upgrade  7 Packages

Total download size: 19 M
Downloading Packages:
(1/7): mariadb-common-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm               141 kB/s |  27 kB     00:00    
(2/7): mariadb-gssapi-server-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm         73 kB/s |  15 kB     00:00    
(3/7): mariadb-server-utils-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm         2.4 MB/s | 261 kB     00:00    
(4/7): mariadb-errmsg-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm               4.5 MB/s | 254 kB     00:00    
(5/7): mariadb-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm                      5.8 MB/s | 1.7 MB     00:00    
(6/7): mariadb-backup-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm               7.0 MB/s | 6.8 MB     00:00    
(7/7): mariadb-server-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64.rpm               7.8 MB/s |  10 MB     00:01    
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    12 MB/s |  19 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1 
  Upgrading        : mariadb-common-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              1/14 
  Upgrading        : mariadb-errmsg-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              2/14 
  Upgrading        : mariadb-gssapi-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                       3/14 
  Upgrading        : mariadb-backup-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              4/14 
  Upgrading        : mariadb-server-utils-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                        5/14 
  Upgrading        : mariadb-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                     6/14 
  Running scriptlet: mariadb-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              7/14 
  Upgrading        : mariadb-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              7/14 
  Running scriptlet: mariadb-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              7/14 
  Running scriptlet: mariadb-server-3:10.5.27-1.el9_5.0.2.x86_64                                                   8/14 
  Cleanup          : mariadb-server-3:10.5.27-1.el9_5.0.2.x86_64                                                   8/14 
  Running scriptlet: mariadb-server-3:10.5.27-1.el9_5.0.2.x86_64                                                   8/14 
  Cleanup          : mariadb-errmsg-3:10.5.27-1.el9_5.0.2.x86_64                                                   9/14 
  Cleanup          : mariadb-3:10.5.27-1.el9_5.0.2.x86_64                                                         10/14 
  Cleanup          : mariadb-common-3:10.5.27-1.el9_5.0.2.x86_64                                                  11/14 
  Cleanup          : mariadb-backup-3:10.5.27-1.el9_5.0.2.x86_64                                                  12/14 
  Cleanup          : mariadb-gssapi-server-3:10.5.27-1.el9_5.0.2.x86_64                                           13/14 
  Cleanup          : mariadb-server-utils-3:10.5.27-1.el9_5.0.2.x86_64                                            14/14 
  Running scriptlet: mariadb-server-utils-3:10.5.27-1.el9_5.0.2.x86_64                                            14/14 
  Verifying        : mariadb-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              1/14 
  Verifying        : mariadb-server-3:10.5.27-1.el9_5.0.2.x86_64                                                   2/14 
  Verifying        : mariadb-common-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              3/14 
  Verifying        : mariadb-common-3:10.5.27-1.el9_5.0.2.x86_64                                                   4/14 
  Verifying        : mariadb-gssapi-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                       5/14 
  Verifying        : mariadb-gssapi-server-3:10.5.27-1.el9_5.0.2.x86_64                                            6/14 
  Verifying        : mariadb-backup-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                              7/14 
  Verifying        : mariadb-backup-3:10.5.27-1.el9_5.0.2.x86_64                                                   8/14 
  Verifying        : mariadb-server-utils-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                        9/14 
  Verifying        : mariadb-server-utils-3:10.5.27-1.el9_5.0.2.x86_64                                            10/14 
  Verifying        : mariadb-errmsg-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                             11/14 
  Verifying        : mariadb-errmsg-3:10.5.27-1.el9_5.0.2.x86_64                                                  12/14 
  Verifying        : mariadb-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                    13/14 
  Verifying        : mariadb-3:10.5.27-1.el9_5.0.2.x86_64                                                         14/14 

Upgraded:
  mariadb-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                             
  mariadb-backup-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                      
  mariadb-common-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                      
  mariadb-errmsg-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                      
  mariadb-gssapi-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                               
  mariadb-server-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                      
  mariadb-server-utils-3:10.11.10-1.module+el9.6.0+31841+9417776a.x86_64                                                

Complete!

root@rocky9:~# systemctl restart mariadb

root@rocky9:~# rpm -qa | grep mariadb-server
mariadb-server-utils-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64
mariadb-server-10.11.10-1.module+el9.6.0+31841+9417776a.x86_64

root@rocky9:~# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.11.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.001 sec)

as you can clearly see, I was on MariaDB 10.5, then I switched modules, and then I did dnf update. Then I restarted MariaDB, and you can clearly see MariaDB running and the default databases.

No, the process should not cause problems for your databases. But obviously, you should make sure you have backups of your system before you do anything that might break something.

Also, forget about webmin and stop using it.

I normally stop the old service, backup, uninstall using dnf, then enable the stream, then install the new packages, then start the new version. Plus I also run the mysql upgrade tool after checking that it’s going to do what I expect it to do, e.g. fixing system tables where there have been schema changes.

That is what MariaDB recommends: mariadb-upgrade | MariaDB Documentation

Their overall procedure is:

  1. Make backup of data in databases
  2. Stop service
  3. Remove old packages
  4. Install new packages
  5. Start service
  6. Run mariadb-upgrade
  7. Restart service

There can be also changed defaults, renames, or removals of options. Example: Upgrading from MariaDB 10.6 to MariaDB 10.11 | MariaDB Documentation

Somewhere there was a note that package upgrade might also run the mariadb-upgrade, but that running it multiple times is not an error.

1 Like

This was something I was also under the impression of as well, that deb/rpm package upgrades would take care of it. Although I’ve not checked the pre/post scripts to verify if that is the case or not. So definitely good advice to run the mysql_pgrade anyway, just in case to be sure. Not something I’ve done personally and never had any issues when I was using MariaDB when I didn’t run it.

That is what MariaDB recommends: mariadb-upgrade | MariaDB Documentation

Their overall procedure is:

  1. Make backup of data in databases
  2. Stop service
  3. Remove old packages
  4. Install new packages
  5. Start service
  6. Run mariadb-upgrade
  7. Restart service

Just 2 remarks:

  • Steps 2-5 are handled during dnf update by the package pre/post scripts of the rpm package.

  • Step 6 needs to run manually. However the mariadb.service runs a script after any startup which checks for an outdated data directory and prints a warning in the journal. That script is located at /usr/libexec/mariadb-check-upgrade The warning (if it exists) can be seen by running journalctl -u mariadb.service

2 Likes

Thank you all for your answers, they have been very helpful.

While MariaDB boasts about backward-compatibility, they do also mention:

If you skip running mariadb-upgrade, issues can arise, including these:

  • Errors in the error log that some system tables don’t have all needed columns.
  • Updates or searches may not find the record they are attempting to update or search for.
  • CHECKSUM TABLE may report the wrong checksum for MyISAM or Aria tables.
  • The error message “Cannot load from mysql.proc. The table is probably corrupted.”

In other words it probably depends a lot on the content and use of the database, whether things happen or not.


The script mentioned by @felfert notes:

Please, mind that as a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series.

“Smaller diffs to merge”, I presume. Red Hat has “stepwise” docs too: Chapter 5. Migration | 3.7 Release Notes | Red Hat Software Collections | 3 | Red Hat Documentation


The overarching point is that “a database” is many things:

  • Packages for the binaries, etc. These one can “dnf”
  • System tables (schema and data). Initialized on very first service start, but separate from packages from then-on. The ‘mariadb-upgrade’ (or equivalents) may be required
  • Schemas of the user databases. Tables, etc
  • Data within the user databases

Furthermore, “backup” of database is not file copy of files in /var/lib/… (when service is running).
Rather, one uses mysql-dump or similar tool to fetch consistent set of data.

Thanks jlehtone, I’m reviewing all the documentation you mentioned before running the update, and of course, I have backups of the databases in .sql format. When I finish the update, I’ll report here the result (successful or not) and the steps I followed.

Hello everyone,

I have successfully upgraded to MariaDB 10.11. These are the steps I followed:

$ mysqldump --all-databases --single-transaction --quick --lock-tables=false > /home/backup/mariadb_backup_$(date +%F).sql

create MariaDB.repo file:

$ MariaDB 10.11 RedHatEnterpriseLinux repository list - created 2025-11-01 10:04 UTC
$
[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
baseurl = ``https://mirror.raiolanetworks.com/mariadb/yum/10.11/rhel/$releasever/$basearch
$ gpgkey = ``https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgkey = ``https://mirror.raiolanetworks.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1

$ dnf module enable mariadb:10.11

$ systemctl stop mariadb.service

$ dnf remove “MariaDB*” “mariadb*”

$ ls /var/lib/MySQL

$ dnf clean all
$ dnf makecache

$ dnf install mariadb mariadb-server

$ systemctl enable --now MariaDB

$ mariadb-upgrade

$ systemctl restart mariadb.service

It looks like you installed a non-rocky repo and then did

which I’m guessing would use the official rocky repo

Hi gerry666uk,

Both MariaDB version 10.5 and 10.11 are from the Rocky Linux repository, as appstream modules.

$ dnf list MariaDB

Last metadata expiration check: 3:25:05 ago on Sat 01 Nov 2025 08:15:42 AM CET.
Installed Packages
mariadb.x86_64 3:10.5.27-1.el9_5.0.2 @appstream
Available Packages
mariadb.x86_64 3:10.11.10-1.module+el9.6.0+31841+9417776a appstream

Right, so what’s all the stuff about

https://mirror.raiolanetworks.com/