Skip to content

Upgrade MariaDB 10.6 to 10.11 on cPanel: runbook

Upgrade MariaDB 10.6 to 10.11 on a cPanel server in one step: check my.cnf for removed options, prove the backup restores, shut down cleanly, then upgrade.

You can upgrade MariaDB 10.6 to 10.11 in a single step. Both are long-term support releases, and MariaDB documents 10.6 to 10.11 as one upgrade path, so there is no need to install 10.7, 10.8, 10.9 and 10.10 along the way. On a cPanel server the package change itself is a wizard in WHM. What decides whether the maintenance window goes well is everything the wizard does not do: a database dump you have proved you can restore, a slow clean shutdown of 10.6 before the packages change, and a pass over my.cnf for the options 10.11 removed. cPanel does not support downgrading a database engine, so rolling back means restoring the backup. That is why the backup comes first and gets verified before anything else moves.

What you’ll accomplish

  • Move a production cPanel server from 10.6 to 10.11 with a written gate after every step.
  • Produce two backup artifacts — a logical dump and a cold copy of the data directory — and prove one restores before touching the live server.
  • Catch the configuration options that make 10.11 refuse to start while you are still on 10.6 and can fix them calmly.
  • Know the real behaviour differences across the span, and the pre-flight query that surfaces each.
  • Leave with a documented rollback that does not depend on a downgrade cPanel will not perform.

Prerequisites

  • Root SSH plus a WHM root login. Most of this is shell work; the package swap is easier in WHM.
  • A maintenance window with the database down. Slow shutdown, package swap and mariadb-upgrade are offline work. Size it by data volume, not database count — a few large InnoDB tables take longer to purge than a thousand small ones.
  • Free space on a filesystem that is not the data directory. Dump plus cold copy can approach the size of /var/lib/mysql; writing them next to the live data is how a routine upgrade becomes an outage.
  • A second machine or container running 10.6 to restore the dump into — the verification gate, and the step people skip.
  • A note on tool names. mariadb-upgrade and mariadb-check are the primary names since MariaDB 10.5; mysql_upgrade and mysqlcheck still work as Linux symlinks, so either runs on both versions.
  • A clear view of the support window. MariaDB’s published community end-of-life is 6 July 2026 for the 10.6 series and 16 February 2028 for 10.11. Confirm both on MariaDB’s maintenance policy page before you schedule.

How it works

A MariaDB major upgrade on cPanel is a chain in which each link is only safe once the previous one is provably finished. Two facts fix the order.

The InnoDB redo log format has changed several times across the 10.x series, including in 10.8, which sits inside the span you are crossing. A newer server reads an older data directory only when the older server left it consistent — a shutdown that fully purges and merges, not one that behaves like a crash. MariaDB documents innodb_fast_shutdown values as 0 for a slow shutdown “including full purge and change buffer merge”, 1 as the default fast shutdown, and 2 as a cold shutdown “similar to a crash”, explicitly flagged as “Not suitable for upgrades between major versions”. From 10.8 onward the server also expects its existing redo log files present at startup, so deleting ib_logfile0 to clear an error is not a repair.

Second, cPanel’s upgrade interface is one-directional: its documentation states the feature “does not support downgrades of database engine versions” and that cPanel “strongly” recommends not attempting one. Reinstalling 10.6 packages over a data directory 10.11 has already opened is not a rollback, it is a worse incident. The only rollback that behaves is a restore — so every step below has a gate, and every failed gate has exactly one exit.

Flow of the MariaDB 10.6 to 10.11 upgrade on cPanel as ordered steps, each with the gate that must pass before the next, and a rollback rail showing that every failed gate leads to restoring from backup

Step-by-step

  1. Take the pre-flight inventory. Everything here is read-only and safe to run against a live 10.6 server.

    mariadb --version
    mariadb -e "SELECT VERSION()"
    grep -i mysql-version /var/cpanel/cpanel.config
    mariadb  Ver 15.1 Distrib 10.6.21-MariaDB, for Linux (x86_64)
    +-----------------+
    | VERSION()       |
    +-----------------+
    | 10.6.21-MariaDB |
    +-----------------+
    mysql-version=10.6

    The mysql-version line in /var/cpanel/cpanel.config is cPanel’s record of the engine it manages; if it disagrees with SELECT VERSION(), resolve that first, because the wizard trusts its own record. Now sweep the option files for settings 10.11 removed or renamed:

    grep -rInE 'innodb_log_write_ahead_size|innodb_version|wsrep_replicate_myisam|wsrep_strict_ddl|keep_files_on_create' /etc/my.cnf /etc/my.cnf.d/
    mariadbd --print-defaults

    No output from the grep is the pass condition. mariadbd --print-defaults shows which options the server will actually read, which matters when a forgotten include file contributes settings. --validate-config is a much later MariaDB addition and is not available here — on 10.6 and 10.11 the only real validation is starting the server, which is why this grep happens now and not after the swap.

    The rest of the change surface splits into four groups by how loudly it fails.

    Map of the MariaDB 10.6 to 10.11 change surface grouped by blast radius — server will not start, data reads differently, queries fail, needs a second pass — each with the pre-flight check that catches it

    Run the checks for the other three groups now:

    mariadb -e "SELECT @@old_mode"
    mariadb -e "SELECT ENGINE, COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','performance_schema','mysql') GROUP BY ENGINE"
    mariadb -e "SELECT COUNT(*) FROM information_schema.COLUMNS WHERE CHARACTER_SET_NAME IN ('utf8','utf8mb3')"
    mariadb-check --all-databases --check-upgrade

    Read @@old_mode carefully. Since 10.6.1 the three-byte character set’s primary name is utf8mb3, and the default old_mode=UTF8_IS_UTF8MB3 keeps utf8 meaning utf8mb3. That default does not change between 10.6 and 10.11, so this upgrade will not silently reinterpret your columns — but if someone removed the flag in my.cnf, utf8 already means utf8mb4 there and new tables behave differently from old ones. The utf8 to utf8mb4 migration is its own project: run it before or after this window, never inside it. The engine count matters next, because --single-transaction only dumps transactional tables consistently.

  2. Take both backups, in that order. cPanel’s documentation puts it plainly: back up your databases before you upgrade the database version. Start with the logical dump, which runs hot and interrupts nobody:

    mysqldump --all-databases --routines --events --triggers --single-transaction > /backup/mariadb-10.6-preupgrade.sql
    ls -lh /backup/mariadb-10.6-preupgrade.sql
    tail -n 1 /backup/mariadb-10.6-preupgrade.sql
    -rw-r--r-- 1 root root 14G Aug 18 01:12 /backup/mariadb-10.6-preupgrade.sql
    -- Dump completed on 2026-08-18  1:47:03

    That trailing -- Dump completed line proves the dump ran to the end rather than dying on a full disk; a dump without it is not a backup. Expect the file to land between a third and the full size of /var/lib/mysql before compression.

    --single-transaction sends a START TRANSACTION before dumping and is, in MariaDB’s words, “useful only with transactional tables such as InnoDB”; MyISAM and MEMORY tables “may still change state” while it runs. So if step 1 showed MyISAM, do not reach for --lock-all-tables and take a global read lock across every customer site — let the cold copy in step 4 be the artifact that covers those tables consistently.

  3. Prove the dump restores, before anything on the live host moves. This is the gate that makes the rest of the runbook safe to attempt. On a scratch server or container running 10.6:

    mariadb < /backup/mariadb-10.6-preupgrade.sql
    mariadb -e "SELECT COUNT(*) FROM information_schema.SCHEMATA"
    mariadb -e "SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','performance_schema')"

    The counts should match what production reports for the same two queries. If the restore errors out, or the counts disagree, stop here: you have lost nothing, and you have learned that your rollback did not exist.

  4. Shut 10.6 down slowly, then take the cold copy. A runtime SET GLOBAL covers the shutdown you are about to perform; the option file entry covers any later stop the upgrade wizard performs on its own.

    mariadb -e "SET GLOBAL innodb_fast_shutdown = 0"
    mariadb -e "SHOW GLOBAL VARIABLES LIKE 'innodb_fast_shutdown'"
    systemctl stop mariadb

    Add innodb_fast_shutdown = 0 under [mysqld] in /etc/my.cnf for the duration of the window and remove it afterwards — a permanently slow shutdown makes every future restart painful. The stop can take a long time on a busy server; that is the purge working, not a hang. Confirm it landed cleanly:

    grep -E 'Shutdown completed|Shutdown complete' /var/lib/mysql/$(hostname).err | tail -n 3
    2026-08-18  2:04:51 0 [Note] InnoDB: Shutdown completed; log sequence number 41827366195; transaction id 8812440

    No such line means do not proceed. Start 10.6 again, let crash recovery finish, repeat the slow shutdown. With a clean stop confirmed, copy the data directory:

    rsync -a /var/lib/mysql/ /backup/mysql-datadir-10.6/
    du -sh /backup/mysql-datadir-10.6/
    df -h /backup /var/lib/mysql
  5. Swap the packages through WHM. The interface is at WHM » Home » SQL Services » MySQL/MariaDB Upgrade. Select 10.11, then choose between the two upgrade types cPanel offers: Unattended Upgrade, which runs without further input, and Interactive Upgrade, which steps you through it. On a host with customer sites, take the interactive path — the prompts are where you learn about a package conflict while you can still read the screen. The equivalent from the shell:

    whmapi1 start_background_mysql_upgrade version=10.11

    When it finishes, confirm what is installed rather than what the wizard reported:

    rpm -qa | grep -i '^MariaDB' | sort
    systemctl status mariadb --no-pager
    mariadb -e "SELECT VERSION()"
    | 10.11.11-MariaDB |
  6. Run mariadb-upgrade. The wizard runs it, but running it yourself is how you read its output. The mysql system tables carry 10.6 definitions until this pass rewrites them.

    mariadb-upgrade --check-if-upgrade-is-needed
    echo $?
    mariadb-upgrade
    echo $?

    Read the first exit code the right way round: --check-if-upgrade-is-needed returns 0 when an upgrade is needed and 1 when it is not. The full run prints Phase N/M: lines and finishes with OK; exit code 0 with no table flagged for repair is the gate. Add --force only to re-run it after a successful pass has already been recorded for this version.

  7. Smoke-test in priority order. Busiest and most revenue-sensitive account first, then work down.

    curl -sS -o /dev/null -w '%{http_code} %{time_total}\n' https://example.com/
    cd /home/exampleco/public_html && wp db check && wp option get siteurl
    200 0.412
    Success: Database checked.
    https://example.com

    For a WooCommerce site, load a category page, a product page and the cart — those exercise query patterns a parser change would break, which the home page does not.

Validate it works

Read the server’s own answers, not the wizard’s summary:

mariadb -e "SELECT VERSION(); SELECT @@old_mode; SELECT @@innodb_buffer_pool_chunk_size"
mariadb-check --all-databases --check-upgrade
tail -n 100 /var/lib/mysql/$(hostname).err
journalctl -u mariadb --since "1 hour ago" -p err --no-pager

VERSION() should report 10.11.x-MariaDB, @@old_mode should still contain UTF8_IS_UTF8MB3 unless you deliberately changed it, and mariadb-check should flag no table needing a version-dependent update. Read innodb_buffer_pool_chunk_size back specifically: its default became autosized rather than a fixed 128 MiB during this span, so the server’s value may not match your notes.

Then watch the application side for an hour. The failure that shows up late is a PHP client built against the old library: check php -i | grep -i 'client api' on the relevant handler, and if it reports a very old client, rebuild PHP through EasyApache 4 rather than adjusting server-side authentication.

Troubleshooting

  • The server refuses to start, “unknown variable” in the log. The most common failed upgrade, and preventable in step 1. Read journalctl -xeu mariadb --no-pager and the error log in the data directory (hostname.err); the line looks like [ERROR] /usr/sbin/mariadbd: unknown variable 'innodb_log_write_ahead_size=8192'. Comment out the named option in /etc/my.cnf or whichever file under /etc/my.cnf.d/ supplies it, re-run mariadbd --print-defaults to confirm it is gone, then start the service. Work one variable at a time — the server reports the first offender it hits, not all of them.

  • The data directory will not open because 10.6 did not shut down cleanly. From 10.8 onward the server expects its existing redo log files at startup, and deleting ib_logfile0 to clear the error is not a fix. If the 10.6 packages are still installed, restore the cold copy from step 4, start 10.6, let crash recovery finish, and repeat the slow shutdown. If the packages are already 10.11, the way forward is a fresh data directory and the verified dump from step 3 — not resurrecting 10.6, which cPanel will not reinstall as a downgrade.

  • mariadb-upgrade names tables that need repair. Run the repair pass explicitly, during the window: mariadb-check --all-databases --check-upgrade --auto-repair. It rewrites the affected tables, so it belongs after a verified backup. Note which account owns each — repeat offenders usually mean a plugin writing to a MyISAM table that should have been converted long ago.

  • Application queries start failing with syntax errors. ROW_NUMBER became a reserved word in 10.7, so an unquoted column or alias of that name now raises a syntax error on a query that ran fine yesterday. Sweep the source and backtick-quote the identifier: grep -rIn -w 'row_number' /home/exampleco/public_html --include='*.php'. The same class of failure covers any SQL that relied on 10.6 being lenient — the fix is in the application, not the server.

  • The upgrade stops mid-way with no space left on device. Almost always the dump and the data directory sharing a filesystem. Check df -h /backup /var/lib/mysql first and write the dump elsewhere. If it has already happened, do not delete files inside /var/lib/mysql to make room; free space elsewhere or move the dump off, then restart from a clean shutdown.

When this is the wrong approach

Do not run this mid-quarter on a revenue-critical store with no staging copy. The gates tell you when to stop, but they cannot tell you what a WooCommerce checkout does under a new parser until you have run one — and that belongs on a clone, not production.

Do not pair it with an operating-system upgrade. Both are large package changes touching the same libraries, and running them together means that when something breaks you cannot say which one did it. Separate them by at least a full business day of normal traffic.

With 10.6 community support already behind us, waiting is not free either — but the answer to a missed deadline is a properly scoped window, not a rushed one. Servers still on 10.5 should read the 10.5 to 10.6 upgrade first and take the hops as separate windows.

The authoritative references are MariaDB’s Upgrading from MariaDB 10.6 to MariaDB 10.11 page, which lists the removed options and changed defaults, and the cPanel and WHM documentation.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.