| SYSTEM INFORMATION | |
|---|---|
| OS type and version | Ubunutu 24.04 |
| Webmin version | 2.402 |
| Virtualmin version | 7.30.8 |
| Webserver version | Apache/2.4.58 |
| Related packages | mariadb 12.x.x |
Don’t believe anyone that says you can’t or don’t do it. You can and with a little bit of work it will operate very happily.
Below is a guide on how to install mariadb v12.x.x on a ubuntu 24.04 system with virtualmin. This guide will fix all the errors and re-engage mariadb in virtualmin.
It would also be possible to get it to work on 22.04 but you will need to change the key in the first step below to a repo suitable. I’m not running 22.04 but I believe you would just need to change where is has ubuntu noble main to ubuntu jammy main
Make sure you backup your database before doing the upgrade
Please excuse the formatting, this isn’t the easiest system to write this out in.
1) Install MariaDB 12.0.x from MariaDB’s official repo for Ubuntu 24.04 (noble) and optionally prefer upstream over Ubuntu.
# Add the mariadb Key + reposudo mkdir -p /etc/apt/keyrings curl -fsSL https://mariadb.org/mariadb_release_signing_key.asc | sudo gpg --dearmor -o /etc/apt/keyrings/mariadb.gpgecho "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/mariadb.gpg] https://dlm.mariadb.com/repo/mariadb-server/12.0/repo/ubuntu noble main" | sudo tee /etc/apt/sources.list.d/mariadb.list# (Optional, but recommended) prefer mariaDB upstream over ubunutu's reposudo tee /etc/apt/preferences.d/mariadb.pref >/dev/null <<'EOF' Package: * Pin: origin dlm.mariadb.com Pin-Priority: 700EOFsudo apt update sudo apt install mariadb-server mariadb-clientmariadb
2) Update Virtualmin module binaries
Make sure Virtualmin/Webmin is recent. Many fixes land via package updates.
sudo apt update sudo apt install webmin
3) Verify services
Check client/server versions and that mariadb service is running.
mariadb --version mariadbd --version systemctl status mariadb --no-pager
4) Clear any old Webmin cache (optional)
If you already tried earlier and Webmin cached a failing version parse, clear and restart Webmin.
sudo rm -f /etc/webmin/mysql/version sudo systemctl restart webmin
5) Make Webmin accept MariaDB 12 (version wrapper + paths)
Virtualmin’s MySQL module expects a classic “mysql Ver … Distrib …” line and currently rejects any version > 10.11.13. Here we spoof the last known working version and its formatted version output. This does not affect the version installed; it will still report as 12.x.x in Virtualmin — this wrapper is only to bypass Virtualmin’s checks.
# Wrapper so "mysql -V" prints a classic, parseable line sudo tee /usr/local/bin/mysql >/dev/null <<'EOF' #!/bin/sh if [ "$1" = "-V" ] || [ "$1" = "–version" ]; then echo "mariadb Ver 15.1 Distrib 10.11.13-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper" exit 0 fi exec /usr/bin/mariadb "$@" EOF sudo chmod +x /usr/local/bin/mysql
6) Go to Webmin → Servers → MySQL Database Server → Module Config → System configuration
Set:
Path to mysql /usr/local/bin/mysql
Path to mysqladmin /usr/bin/mariadb-admin
Path to mysqlshow /usr/bin/mariadb-show
Path to mysqldump /usr/bin/mariadb-dump
Path to mysqlimport /usr/bin/mariadb-import
Path to mysqld /usr/sbin/mariadbd
Start/Stop systemctl start/stop mariadb
Disable MYSQL_PWD, Save, Refresh Modules.
If needed, clear cache and restart Webmin:
sudo rm -f /etc/webmin/mysql/version && sudo systemctl restart webmin
7) Fix “Could not find [mysqld] section in my.cnf” (Configuration & SSL)Provide a drop‑in with [mysqld] and point Webmin to it.
# Create a drop-in that contains [mysqld] sudo tee /etc/mysql/mariadb.conf.d/99-webmin.cnf >/dev/null <<'EOF' [mysqld] # Webmin placeholder. Real settings live in other files. # Webmin's "Configuration & SSL certificate" page will write here. EOF # Tell Webmin to use it sudo sed -i 's|^my_cnf=.*|my_cnf=/etc/mysql/mariadb.conf.d/99-webmin.cnf|' /etc/webmin/mysql/config # Restart Webmin to apply sudo systemctl restart webmin
now when you visit webmin → servers → Mariadb Database Server or MySQLServer it will report MariaDB version 12.x.x on 127.0.0.1
You can create, edit and delete databases and users from within virtualmin/webmin
Now that I have proven it all works, I do not see why Virtualmin does not offer the upgrade path or latest version already installed. As they are pushing to use mariaDB they should maintain support for it’s integration. but that is jsut my opinion.