To install MariaDB 12.3 on Rocky Linux 10 or AlmaLinux 10 you need the mariadb.org repository, because AppStream still ships the 10.11 line and nothing newer. The 12.3 series is the first LTS of the 12.x family, and the 12.0 repository that older guides point at now returns a 404. If you followed one of those guides, your next dnf upgrade will fail on metadata before it touches a package.
You will add the 12.3 repo and GPG key, install and secure the server, create an app user, open it to one subnet and keep SELinux enforcing. That last part needed a fix, because the upstream mariadbd runs unconfined on EL10 until you relabel it. We also upgraded a 12.0 server to 12.3. Every command below was run on Rocky Linux 10.2 and AlmaLinux 10.2 in November 2026, against MariaDB 12.3.3 from rpm.mariadb.org.
Pick the MariaDB line for EL10
Install the 12.3 LTS line for anything new. It gets community binaries until 12 June 2029 under the MariaDB Foundation maintenance policy, which makes it the line we recommend over 12.0. That policy page does not list 12.0 at all, and in our lab rpm.mariadb.org/12.0 returned a 404 while only archive.mariadb.org still carried 12.0.2. The table below lines up the options you have on an EL10 box; the 10.11, 11.4, 11.8 and 12.3 end dates come from that policy page:
| Line | Where it comes from | Type | Community support ends |
|---|---|---|---|
| 10.11 | Rocky/Alma AppStream | LTS | 16 Feb 2028 |
| 11.4 | rpm.mariadb.org | LTS | 29 May 2029 |
| 11.8 | rpm.mariadb.org | LTS | 4 Jun 2028 |
| 12.0 | archive.mariadb.org only | Not listed on the policy page | No date published, repo returns 404 |
| 12.3 | rpm.mariadb.org | LTS | 12 Jun 2029 |
If an application vendor certifies only 11.4, our MariaDB 11.4 guide for Rocky Linux 10 and AlmaLinux 10 uses the same repo layout with a different path. Everyone else should take 12.3, which is what the rest of this guide installs.
Check the prerequisites
We used two small x86_64 VMs with 2 vCPUs and 4 GB of RAM each. Treat that as a floor for a lab, not a production size. On a real database host, RAM is driven by the InnoDB buffer pool, which should hold your hot working set, so a server with 20 GB of active data wants 32 GB or more. Disk I/O matters next, so put the data directory on SSD storage. Before you start, have these ready:
- Rocky Linux 10 or AlmaLinux 10, x86_64, fully updated
- A user with sudo rights
- SELinux in enforcing mode (
getenforceprintsEnforcing) - firewalld running, which is the default on both distros
- Outbound HTTPS to rpm.mariadb.org and whichever mirror it redirects to (ours went to third-party mirrors, so an egress allowlist needs a pinned
baseurl)
Our lab hosts were db01 (Rocky, 10.0.1.50) for the fresh install and db02 (Alma, 10.0.1.51) for the upgrade path and remote client tests.
Add the MariaDB 12.3 repository and GPG key
We skip the mariadb_repo_setup script the old version of this guide used and write the repo file by hand, since it is only six lines, and you can read every one of them before dnf trusts it. Create the file in the yum repos directory with your editor of choice:
sudo vim /etc/yum.repos.d/MariaDB.repo
Paste the following into it. The $releasever variable expands to 10 on both Rocky 10.2 and Alma 10.2, so the same file works on either:
# MariaDB 12.3 LTS repository
[mariadb]
name = MariaDB 12.3
baseurl = https://rpm.mariadb.org/12.3/rhel/$releasever/$basearch
gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck = 1
module_hotfixes = 1
The module_hotfixes line matters on EL8 and EL9, where a modular MariaDB stream can otherwise hide these packages from dnf. Keep it on EL10 too, because the same file then works unchanged across all three. Now confirm that dnf sees both sources and both package names:
dnf list --showduplicates mariadb-server MariaDB-server 2>/dev/null
The upstream packages use a capital M, and AppStream’s use lowercase with an epoch of 3:
MariaDB 12.3 54 kB/s | 21 kB 00:00
Available Packages
MariaDB-server.x86_64 12.3.2-1.el10 mariadb
MariaDB-server.x86_64 12.3.3-1.el10 mariadb
mariadb-server.x86_64 3:10.11.15-2.el10_1 appstream
mariadb-server.x86_64 3:10.11.18-1.el10_2 appstream
That epoch made us expect AppStream to win a lowercase install, so we tested it with sudo dnf install --assumeno mariadb-server. dnf resolved it to MariaDB-server from the mariadb repo anyway. rpm -q --provides MariaDB-server explains why. The upstream package provides mariadb-server with the same epoch 3 and a higher version, and it obsoletes the distro name as well. You don’t need an exclude= line in the AppStream repo. We still use the capitalised names below so nobody reading the command has to guess which package lands.

The GPG key is not imported until the first install pulls a signed package, so you will check its fingerprint in the next step.
Install MariaDB and start the service
Install the server, the client and mariadb-backup together. You want the backup tool on the box before there is data worth losing:
sudo dnf install -y MariaDB-server MariaDB-client MariaDB-backup
dnf asks to import the MariaDB signing key on the first install. Check the fingerprint before you accept it, because this is what our AlmaLinux host printed:
Importing GPG key 0xC74CD1D8:
Userid : "MariaDB Signing Key <[email protected]>"
Fingerprint: 177F 4010 FE56 CA33 3630 0305 F165 6F24 C74C D1D8
Key imported successfully
Read the transaction summary before you move on, because it differs from older MariaDB installs on EL10 in ways that matter later:
- It pulls
mysql-selinuxfrom AppStream, the policy module we rely on later - It no longer pulls
galera-4, which 12.3 dropped as a server dependency - Everything else comes from BaseOS and AppStream, mostly Perl modules for the helper scripts
If you plan to cluster this node later, you install Galera yourself. Enable the service and start it:
sudo systemctl enable --now mariadb
Then check the unit, the client version and the server version in one pass:
systemctl status mariadb --no-pager | head -12
mariadb --version
sudo mariadb -e "SELECT VERSION();"
The status line names the exact build, and the server reports itself as 12.3.3-MariaDB. On a fresh install, root logs in over the Unix socket, so sudo mariadb works without a password:

The migrated-from-my.cnf-settings.conf drop-in is created by the package. Leave it alone unless you have old mysqld_safe options to move.
Confine mariadbd under SELinux
SELinux is enforcing, so it is easy to assume the database is confined. It is not, and the reason is a path quirk. EL10’s file contexts map /usr/sbin onto /usr/bin, and the only policy rule that takes effect labels /usr/libexec/mariadbd, which is where the AppStream build lives. The mariadb.org RPM installs /usr/sbin/mariadbd, which gets the generic bin_t label, so systemd starts it as unconfined_service_t. Check the running process on your own host:
ps -eZ | grep mariadbd
If the first field says unconfined_service_t, add a file-context rule for the substituted path and relabel the binary:
sudo semanage fcontext -a -t mysqld_exec_t /usr/bin/mariadbd
sudo restorecon -v /usr/sbin/mariadbd
sudo systemctl restart mariadb
The rule targets /usr/bin/mariadbd on purpose, because a rule written for /usr/sbin/mariadbd already exists in the policy, but the sbin substitution means it never matches. After the restart, the process runs in mysqld_t. The ausearch line in the capture can miss events on these images (see the port 3307 error below), so we also counted denials with sudo grep -c denied /var/log/audit/audit.log, which stayed at 0 on db01 through a full backup run:

We ran the rest of the guide confined on both hosts, including a mariadb-backup full backup and prepare, and saw no denials. The rule lives in the local policy store, so rpm applies it whenever it writes the binary. We checked with sudo dnf reinstall -y MariaDB-server: the new file came out as mysqld_exec_t and the server restarted in mysqld_t with no extra step.
Secure the installation
The 12.3 packages are already close to secure. Root can’t log in with a password because its stored hash is invalid, and only the Unix socket works:
sudo mariadb -e "SHOW CREATE USER root@localhost\G"
That gives you password login disabled, with socket authentication as the fallback:
*************************** 1. row ***************************
CREATE USER for root@localhost: CREATE USER `root`@`localhost` IDENTIFIED VIA mysql_native_password USING 'invalid' OR unix_socket
Run the hardening script anyway, because on our host it still found two anonymous users and two test database grants to remove:
sudo mariadb-secure-installation
Press Enter at the current-password prompt, then answer n to switching to unix_socket and to changing the root password, since root is already socket-only. Answer Y to the four questions after that. The script itself warns that it may go away:
NOTE: MariaDB is secure by default. Running this script is mostly
unecessary and it will likely be removed in a future release,
but it is for now preserved for backwards compatibility.
...
Remove anonymous users? [Y/n] Query OK, 2 rows affected
SQL executed without errors!
...
Remove test database and access to it? [Y/n] - Dropping test database...
Query OK, 0 rows affected
SQL executed without errors!
- Removing privileges on test database...
Query OK, 2 rows affected
SQL executed without errors!
...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Those two affected rows are why the script is still worth a minute on a fresh box, whatever the banner says. Anonymous accounts let anyone who reaches the socket log in, and the test database grants are open to every user, so both would follow you into production if you skipped this step.
Create a database and an application user
Give the application user the PARSEC authentication plugin. MariaDB’s own documentation calls PARSEC the intended future default. It also verifies the server’s self-signed TLS certificate without a CA, which matters in the next section. The plugin ships with the server but isn’t loaded, so install it first:
sudo mariadb -e "INSTALL SONAME 'auth_parsec';"
Create the database with the server’s default utf8mb4_uca1400_ai_ci collation, then a user limited to the application subnet. Swap 10.0.1.% for your app servers’ range and pick a real password:
sudo mariadb -e "CREATE DATABASE appdb CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;"
sudo mariadb -e "CREATE USER 'webapp'@'10.0.1.%' IDENTIFIED VIA parsec USING PASSWORD('Str0ng#AppPass26');"
sudo mariadb -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, DROP ON appdb.* TO 'webapp'@'10.0.1.%';"
Read the grants back so you know exactly what the account can touch:
sudo mariadb -e "SHOW GRANTS FOR 'webapp'@'10.0.1.%';"
The P0: prefix on the stored string is PARSEC’s PBKDF2 marker, and the second line is the scoped grant:
Grants for [email protected].%
GRANT USAGE ON *.* TO `webapp`@`10.0.1.%` IDENTIFIED VIA parsec USING 'P0:NbYygrXPlPrScu1xxZ5JNS8h:eRGpP7D/vsL2/el3trBr9P8kczBdJjltI5KQvkSTE30'
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `appdb`.* TO `webapp`@`10.0.1.%`
Plugins added with INSTALL SONAME are recorded in mysql.plugin. After a restart, PARSEC showed as ACTIVE without any config file change. For a wider audit across every account, our guide to showing grants for all MariaDB users has a one-liner.
Check the client side before you commit to PARSEC, because driver support is still thin. Stock PHP mysqlnd cannot use it without MariaDB’s separate mysqlnd_parsec extension, Connector/J needs 3.5.0 or later, and the AppStream 10.11 client on another EL10 box predates the plugin, so install MariaDB-client from the same repo on the app host. If the application’s driver cannot speak PARSEC, create the user IDENTIFIED VIA ed25519 (after INSTALL SONAME 'auth_ed25519') or with a plain password instead; both still verify the server certificate without a CA.
Migrating users from MySQL 8 instead? 12.3 ships a caching_sha2_password plugin (INSTALL SONAME 'auth_mysql_sha2', also in 11.4.9 and 11.8.4 onward) so their hashes carry over unchanged. MariaDB’s docs position it as a migration aid only. It also trips the client’s certificate check, which we cover in the troubleshooting section.
Open remote access with firewalld
The upstream server.cnf ships with every section empty, so mariadbd listens on 0.0.0.0:3306 and [::]:3306 by default. Only firewalld keeps the port closed. Confirm which zone your interface really uses before you add a rule:
sudo firewall-cmd --get-active-zones
Some cloud images default to the trusted zone, which allows everything. Ours did, and 3306 was reachable before we’d opened anything. If you see trusted, run sudo firewall-cmd --set-default-zone=public first (the public zone keeps ssh open, so you stay logged in). Without the rule below, a probe from db02 then failed with No route to host, which is the public zone’s reject. Allow MySQL traffic only from the application subnet, rather than opening port 3306 to the world:
sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.0.1.0/24" service name="mysql" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --zone=public --list-all
The mysql service is not in the services list, which is what you want. The only way in is the rich rule:

No SELinux change is needed for port 3306, because mysqld_port_t already covers it. Test from a client inside the subnet, as we did with the 12.3 client on db02:
mariadb -h 10.0.1.50 -u webapp -p'Str0ng#AppPass26' appdb -e "SELECT CURRENT_USER(), VERSION(); SHOW STATUS LIKE 'Ssl_cipher';"
The login works, and Ssl_cipher shows TLS 1.3 even though we never configured a certificate. The server generates a self-signed one at startup, and the client verifies it from the shared password during a secure login, a mechanism MariaDB calls zero-configuration SSL:

Moving MariaDB to a non-default port is the one network change SELinux will stop. Label the port before you edit the config, for example with sudo semanage port -a -t mysqld_port_t -p tcp 3307. We show the failure you get without it further down.
Upgrade an existing MariaDB 12.0 server to 12.3
If you installed 12.0 from the earlier version of this guide, your repo file points at a path that now returns 404. The fix and the upgrade are the same job. Point the repo at 12.3 and let dnf move the packages. We ran it on db02, an AlmaLinux 10 host running 12.0.2 with a small legacy database. Take a logical dump first, so you have a way back if the upgrade goes wrong:
sudo mariadb-dump --all-databases --single-transaction --routines --events | gzip | sudo tee /root/pre-12.3-$(date +%F).sql.gz >/dev/null
Next, rewrite the repo name and base URL in place. You keep the GPG key line as it is, because the same key (0xC74CD1D8) signed both the 12.0 and the 12.3 packages in our lab:
sudo sed -i -e 's|^name = .*|name = MariaDB 12.3|' -e 's|^baseurl = .*|baseurl = https://rpm.mariadb.org/12.3/rhel/$releasever/$basearch|' /etc/yum.repos.d/MariaDB.repo
sudo dnf clean metadata
Now upgrade only the MariaDB packages, so an unrelated kernel or glibc update doesn’t land in the same maintenance window:
sudo dnf upgrade -y 'MariaDB-*'
The 12.0.2 server package never required mysql-selinux, so the upgrade brings it in along with the SELinux tooling:

Plan for a short outage, because the RPM scriptlet restarts the server itself, and SELECT VERSION() already returned 12.3 before we touched systemd. Once the packages are in, run the system table upgrade:
sudo mariadb-upgrade
Then check the data you care about and the upgrade marker file. Our three test rows came through intact, and mariadb_upgrade_info records the new version:

The screenshot also shows galera-4 still installed, because under 12.0 the server package required it. Nothing needs it under 12.3, so dnf leaves it behind as an orphan. If you don’t run Galera, remove it, but watch the transaction: a plain dnf remove galera-4 also offered to remove openssl and boost-program-options as unused dependencies. Remove only Galera and keep the rest with:
sudo dnf remove -y --noautoremove galera-4
Finally, check the SELinux domain again with ps -eZ | grep mariadbd. After the upgrade our Alma host was still running unconfined_service_t, and the same semanage fcontext and restorecon pair from earlier moved it to mysqld_t.
Try the 12.3 features worth knowing
The full 12.3 changes list is long, because it rolls up everything since 11.8. We tested three features that an admin will use in the first week:
SET SESSION AUTHORIZATIONruns your session as another account, which is handy for testing grants without that account’s password- Optimizer hints in MySQL syntax, including
MAX_EXECUTION_TIMEto cap a runaway SELECT innodb_index_shrink, new in 12.3.3, which you can switch off to cut B-tree latch contention on update-heavy tables
Impersonating webapp shows exactly what the application sees. Its SHOW DATABASES lists only appdb, and a read on mysql.user fails with error 1142. The hint test kills a three-second SLEEP after one second:
sudo mariadb -e "SET SESSION AUTHORIZATION 'webapp'@'10.0.1.%'; SELECT CURRENT_USER(), USER(); SHOW DATABASES;"
sudo mariadb -e "SELECT /*+ MAX_EXECUTION_TIME(1000) */ SLEEP(3) AS slept;"
Both features behave the way the release notes describe:

innodb_index_shrink defaults to ON, which is the old behaviour. Leave it on unless you’ve measured index latch waits on a table whose updates turn NULLs into values.
Fix the errors we hit in the lab
Every message below came from the two lab hosts, each with its cause and the fix that worked for us.
Status code: 404 for https://mirror.mariadb.org/yum/12.0/rhel/10/x86_64/repodata/repomd.xml
Any repo file that still says rpm.mariadb.org/12.0 fails like this, because the mirror only serves current lines:
Errors during downloading metadata for repository 'mariadb':
- Status code: 404 for https://mirror.mariadb.org/yum/12.0/rhel/10/x86_64/repodata/repomd.xml
Error: Failed to download metadata for repo 'mariadb': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Change the base URL to the 12.3 path and follow the upgrade section above. If you really need to rebuild an exact 12.0.2 box, for example to restore a physical backup, archive.mariadb.org still carries mariadb-12.0.2/yum/rhel/10/x86_64. That is where we got our upgrade test server.
ERROR 1524 (HY000): Plugin ‘caching_sha2_password’ is not loaded
The CREATE USER ... IDENTIFIED VIA caching_sha2_password statement fails until the plugin is loaded. information_schema.all_plugins lists it as NOT INSTALLED from auth_mysql_sha2.so, and the same applies to parsec and ed25519. Load it once and it stays loaded across restarts:
sudo mariadb -e "INSTALL SONAME 'auth_mysql_sha2';"
Rerun the CREATE USER statement and it goes through. If you prefer config over SQL, MariaDB’s documentation offers plugin_load_add = auth_mysql_sha2 in a [mariadb] section instead.
ERROR 2026 (HY000): TLS/SSL error: Failed to verify the server certificate
We hit this logging in remotely as a caching_sha2_password user with the default client settings. The same password with a PARSEC or ed25519 user worked over TLS on the same host. Password-based certificate verification works with the native password, ed25519 and PARSEC plugins only, so the client has nothing it can verify the self-signed certificate against. Pick whichever of these fixes your application can live with, starting from the top:
- Move the account to PARSEC once the application’s driver supports it
- Give the server a certificate from a CA the client trusts
- Pass
--disable-ssl-verify-server-certon a network you control, which still encrypts but no longer protects against an impostor server
Can’t start server: Bind on TCP/IP port. Got error: 13: Permission denied
We set port = 3307 on the confined server, and the restart failed with this in the journal. The AVC record in the audit log names the cause plainly:
avc: denied { name_bind } for pid=4183 comm="mariadbd" src=3307 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket permissive=0
On our hosts ausearch -m avc returned <no matches> for this event, so read it with sudo grep denied /var/log/audit/audit.log. Running sudo semanage port -a -t mysqld_port_t -p tcp 3307 fixed it, and the next restart bound to 3307. An unconfined mariadbd never shows this error, which tells you whether the relabel took.
io_uring_queue_init() failed with EPERM: sysctl kernel.io_uring_disabled has the value 2
Both lab hosts had kernel.io_uring_disabled = 2, so this warning appeared at every start. It is harmless, and you can tell from the lines right after it. The next journal lines read create_uring failed: falling back to libaio and InnoDB: Using Linux native AIO, and innodb_use_native_aio stays ON. Don’t relax the sysctl just to silence it.
bash: connect: No route to host on port 3306
That is firewalld rejecting the packet, not a routing fault. Check that the client’s address falls inside the rich rule’s source range and that the rule was added with --permanent followed by a reload. Once we re-added the rule for 10.0.1.0/24, the same probe from db02 returned open.
Harden it before production
What you have now is a confined, firewalled 12.3 server with a scoped application account and TLS on by default. These are the next items for a box that will hold real data:
- Set
bind-addressin/etc/my.cnf.d/server.cnfto the private interface only - Turn on
require_secure_transport = ONso no client can fall back to plain text - Raise
innodb_buffer_pool_sizefrom its 128 MB default to fit your working set - Schedule
mariadb-backupand test a restore, as in our MariaDB point-in-time recovery guide
When one node isn’t enough, the MariaDB Galera cluster with HAProxy and Keepalived builds on this same install. Install galera-4 yourself there, since 12.3 no longer pulls it in. Debian and Ubuntu shops can follow the matching MariaDB 12 on Debian and MariaDB 12 on Ubuntu guides. For deeper reading on query tuning and replication, our list of the best MySQL and MariaDB books is a good place to start.