A cPanel admin says “we’re on MariaDB 10.6.” WHM > MySQL/MariaDB Upgrade says 10.6. The version banner in phpMyAdmin says 10.6. But a query against SELECT VERSION() returns 10.11.4. Three sources of truth, all reporting differently because the cPanel-managed view caches the last action, the package manager has its own state, and the running daemon is the only thing that actually answers requests. Verifying the version is a three-step check, and the wrong answer leads to upgrade attempts that fail confusingly.
What’s happening
cPanel tracks the MariaDB version it last installed in /var/cpanel/mysqlversion.cpanel and similar metadata. The package manager (yum/dnf) tracks the actually-installed packages in rpm -qa. The running daemon is what SELECT VERSION() returns. These can drift when:
- Someone yum-updated MariaDB outside the cPanel wizard.
- A failed
MySQL/MariaDB Upgradeleft cPanel thinking it succeeded. - The daemon hasn’t been restarted since a package update.
- An external repo (MariaDB official, Percona) is configured and updates outside cPanel’s awareness.
For any upgrade plan, troubleshoot, or migration, the truth is SELECT VERSION() — the others are useful for context.
How to verify
mysql -e "SELECT VERSION()"
mysql -e "SELECT @@version_comment" # distinguishes MariaDB and Percona
rpm -qa | grep -i "mariadb\|mysql" | sort
yum list installed | grep -i "mariadb\|mysql"
cat /var/cpanel/mysqlversion.cpanel 2>/dev/null
cat /etc/cpupdate.conf | grep -i mysql
systemctl status mariadb | head
ls -la /var/lib/mysql/*.pid
If SELECT VERSION() and the installed packages disagree, the daemon is running an older version than what’s installed — it needs a restart. If /var/cpanel/mysqlversion.cpanel and the running version disagree, cPanel’s view is stale.
The fix
- Trust
SELECT VERSION()over everything else. That’s what client connections actually see and what feature compatibility is determined by. - If
SELECT VERSION()and installed packages disagree:- Stop MariaDB:
systemctl stop mariadb - Start MariaDB:
systemctl start mariadb SELECT VERSION()should now match the package version.- Run
mysql_upgrade --forceif it hasn’t been run since the package update.
- Stop MariaDB:
- If cPanel’s view is stale (UI says 10.6 but daemon says 10.11):
- Run the cPanel sync:
/scripts/check_cpanel_rpms --targets=MySQL --fix - Or update the version metadata:
/usr/local/cpanel/scripts/build_cpanel_rpm_versions
- Run the cPanel sync:
- If you suspect an external MariaDB repo is overriding cPanel:
cPanel-managed MariaDB lives inls /etc/yum.repos.d/MariaDB.repo yum repolist | grep -i mariadb/etc/yum.repos.d/CL-MariaDB-cPanel-XXX.repo. If you also have a/etc/yum.repos.d/MariaDB.repofrom mariadb.org, the two compete and yum will pick whichever has higher priority. Disable the external repo unless you’re intentionally tracking it. - For audit / compliance reporting, always quote the daemon version:
mysql -e "SELECT @@version, @@version_compile_os, @@version_compile_machine" - For troubleshooting “the upgrade didn’t take”:
- The MySQL/MariaDB Upgrade wizard logs to
/var/log/cpanel/mysql-upgrade.log. Read that first. - If the wizard succeeded but the daemon is the old version, restart was missed. Restart.
- If the wizard failed mid-way, the system may have one version’s packages and another’s data files. Restore from the pre-upgrade dump or contact cPanel support.
- The MySQL/MariaDB Upgrade wizard logs to
- For change-control reporting to customers, the version banner in cPanel/WHM matches
mysqlversion.cpanel. Refresh that file with the sync command so the UI tells the truth.
For environments where MariaDB version drift across hosts is a recurring issue, Stack Harbor’s WHM server management team scripts a fleet-wide audit that compares SELECT VERSION() against expected versions per host and flags drift before the next upgrade window.