AdminsForum

CyberPanel Databases & phpMyAdmin Guides

Guide Upgrade MariaDB 10.11 to 11.4 on CyberPanel: What We Ran and What Changed

Started by JAY 0 replies 156 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
Upgrade MariaDB 10.11 to 11.4 on CyberPanel: What We Ran and What Changed (Tested)

CyberPanel 3.0.8 installs MariaDB 10.11. If an app needs a newer version, or you want the current long-term release, you can upgrade MariaDB yourself. CyberPanel has no button for it. We upgraded a CyberPanel server (Ubuntu 24.04) from MariaDB 10.11.19 to 11.4.13 and checked the panel, the websites, mail and DNS afterwards. Everything kept working, but the upgrade silently threw away our tuned database settings, and one automatic step failed and had to be run by hand.

Before you start: this is a major-version upgrade of the database every site on the server uses. Take a snapshot of the VPS if your provider offers one, do it at a quiet time, and expect the databases to be offline for a short moment. Going back down to 10.11 afterwards is not a simple reinstall, which is why step 1 matters.

Step 1: Back up everything
Over SSH as root:
Code:
mkdir -p /root/mariadb-upgrade cp -a /etc/apt/sources.list.d/mariadb.sources /root/mariadb-upgrade/ cp -a /etc/mysql /root/mariadb-upgrade/etc-mysql mysqldump --all-databases --single-transaction --routines --events | gzip > /root/mariadb-upgrade/all-databases.sql.gz ls -lh /root/mariadb-upgrade/
The dump is a copy of every database in one file. Ours took a second, because our databases are small. Check that the file isn't empty before you go on. The copy of
Code:
/etc/mysql
is your config backup. You'll need it in step 5.

Step 2: Point the package source at 11.4
CyberPanel set up MariaDB's own package source, fixed to version 10.11. Check yours:
Code:
grep URIs /etc/apt/sources.list.d/mariadb.sources
Ours showed
Code:
.../mariadb-server/10.11/repo/ubuntu
. Change the version number in that line and refresh:
Code:
sed -i "s#/10.11/#/11.4/#" /etc/apt/sources.list.d/mariadb.sources apt-get update apt-cache policy mariadb-server
The last command should now show a Candidate starting with
Code:
1:11.4
. If it still says 10.11, stop here and check the file.

Step 3: Upgrade
Code:
DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold mariadb-server mariadb-client
The two
Code:
Dpkg::Options
tell the installer to keep your existing config files instead of stopping to ask. On our server this took 21 seconds. Then:
Code:
systemctl is-active mariadb mariadb -e "SELECT VERSION();"
Ours answered active and 11.4.13-MariaDB.

Step 4: Run mariadb-upgrade by hand
After a version jump, MariaDB has to check and update its internal tables. It tries this by itself at startup, and on our server that attempt failed. The log showed:
Code:
Access denied for user 'root'@'localhost' (using password: NO) FATAL ERROR: Upgrade failed
The automatic check logs in without a password, and on a CyberPanel server root has one. So run it yourself. As root it picks up the saved password:
Code:
mariadb-upgrade
It listed every table with OK and ended with
Code:
Phase 8/8: Running 'FLUSH PRIVILEGES'
and
Code:
OK
. That same failed line shows up again at every MariaDB start. Once you've run the upgrade by hand, it's noise.

Step 5: Check your settings (ours were gone)
We had used CyberPanel's Optimize MySQL tool before, which writes its settings into
Code:
/etc/mysql/my.cnf
. After the upgrade:
Code:
ls -la /etc/mysql/my.cnf /etc/mysql/my.cnf -> mariadb.cnf
The package had replaced our file with its standard link. The buffer pool was back at the default 128 MB (it had been 1228 MB), and the slow query log was off again. There was no warning.

We put our file back from the step 1 backup and restarted:
Code:
cp --remove-destination /root/mariadb-upgrade/etc-mysql/my.cnf /etc/mysql/my.cnf systemctl restart mariadb
MariaDB 11.4 started fine with the old settings file, and the values were back (buffer pool 1228 MB, slow query log on). If you never changed
Code:
/etc/mysql/my.cnf
, you have nothing to restore. Settings in
Code:
/etc/mysql/mariadb.conf.d/
were kept.

Step 6: Check the panel and your sites
What we tested after the upgrade, all working:
  • WordPress sites loaded, including the login page (which needs the database).
  • In CyberPanel: listing databases, creating a database and deleting it again.
  • phpMyAdmin opened from the panel and showed the new version:
    cyberpanel phpmyadmin mariadb 11 4 after upgrade   
  • Mail and DNS, which keep their accounts and records in MariaDB, still answered.

Good to know
  • The mysql command now prints a notice. On 11.4, every
    Code:
    mysql ...
    command adds the line mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead. It still works. In your own scripts, use
    Code:
    mariadb
    and
    Code:
    mariadb-dump
    instead.
  • Why 11.4: it's a long-term support release. We didn't test newer versions such as 11.8 or 12.x.
  • CyberPanel upgrades: we can't say yet how a later CyberPanel upgrade treats a server that's no longer on 10.11. After a panel upgrade, check
    Code:
    grep URIs /etc/apt/sources.list.d/mariadb.sources
    and the MariaDB version again.
  • If something is badly wrong: you have the full dump from step 1. Restoring it into a fresh MariaDB is the way back, and a VPS snapshot is the faster one.

Upgraded yours? Tell us your CyberPanel and MariaDB versions below, and whether anything else needed fixing.
Reply

Messages In This Thread
Upgrade MariaDB 10.11 to 11.4 on CyberPanel: What We Ran and What Changed - by JAY - 11-14-2026, 06:03 PM
Possibly Related Threads…matched by title
Replies:0Views:119
Replies:0Views:115
Replies:0Views:197
Replies:0Views:190
Replies:0Views:240

Users browsing this thread: 1 Guest(s)
Forum Jump: