Emergency server help: get in touch

MariaDB Not Starting After Upgrade: 5 Recovery Fixes

A recovery sequence for a cPanel server whose MariaDB refuses to start after a version jump, covering removed configuration variables, InnoDB crash recovery levels, running mariadb-upgrade, and application errors caused by stricter sql_mode defaults in 11.4 and later.

Published Updated 8 min read

Short answer: MariaDB not starting after upgrade usually means the configuration still sets an option the new version removed, or that InnoDB cannot recover after the old server was not shut down cleanly. Read the last [ERROR] lines with tail -n 50 /var/lib/mysql/$(hostname).err (or the file named by log_error). Comment out any unknown variable in /etc/my.cnf or /etc/my.cnf.d/ and start again. For InnoDB errors, copy /var/lib/mysql aside first, start with innodb_force_recovery=1 and dump. Once it runs, execute mariadb-upgrade. (Reviewed October 2026.)

Applies to cPanel & WHM 136 and later with MariaDB 10.5, 10.6, 10.11, 11.4 or 11.8 (the versions cPanel lists for AlmaLinux/CloudLinux 8, 9 and 10 and Ubuntu 24); remarks about MariaDB 12.x apply only to servers running MariaDB outside cPanel's supported list.

MariaDB upgrades through WHM usually complete in minutes, but when the service fails to come back the whole server’s sites go down at once. The failure is almost always one of four things: a configuration variable the new version no longer recognises, InnoDB refusing to recover from an unclean shutdown, system tables that have not been upgraded, or an application that cannot cope with the stricter defaults in 11.4 and later. This guide takes them in the order you should check.

Read the error log first

Nothing else is worth doing until you have the last few lines of the error log:

systemctl status mariadb --no-pager
journalctl -u mariadb --no-pager | tail -30
tail -60 /var/lib/mysql/$(hostname).err

Which file holds the log depends on log_error: set without a file name, it is the hostname-named file in the data directory; set to a path, it is that file (grep -i 'log.error' /etc/my.cnf); not set at all, the messages go to stderr and therefore to the journal. The last [ERROR] line before Aborting names the cause.

Unknown variable: remove what the new version dropped

If the log says unknown variable 'innodb_log_write_ahead_size=...' or similar, the server is refusing to start because /etc/my.cnf (or a file under /etc/my.cnf.d/) references an option that was removed. Common victims are wsrep_strict_ddl (removed by 10.11), the legacy innodb_file_format family (removed in 10.6) and, on MariaDB 12.x, big_tables, large_page_size and storage_engine (removed in 12.0). innodb_log_write_ahead_size was removed in 10.8 but reintroduced in 10.11.9, 11.4.3 and later releases, so current 10.11 and 11.4 packages accept it, and keep_files_on_create was only deprecated, never removed. Comment the line out and try again:

grep -nE 'innodb_log_write_ahead_size|wsrep_strict_ddl|keep_files_on_create|big_tables|large_page_size|^storage_engine' /etc/my.cnf /etc/my.cnf.d/*.cnf
systemctl start mariadb

Repeat until the log stops complaining. Do not delete my.cnf wholesale; the buffer pool and connection settings in it are what keep the server usable under load. Our companion guide on unknown variable startup failures has the full list per version.

InnoDB will not recover

An InnoDB: Database page corruption or Plugin 'InnoDB' init function returned error message means the redo log or a tablespace is inconsistent, usually because the old version was killed rather than shut down cleanly before the packages were swapped. Before touching anything, copy the data directory somewhere safe:

systemctl stop mariadb
cp -a /var/lib/mysql /var/lib/mysql.pre-recovery

Then bring the server up in forced-recovery mode, starting at level 1 and increasing only if needed:

mysqld_safe --innodb-force-recovery=1 &

Levels 1 to 3 are read-safe and let you dump. Level 4 and above skip more of the recovery and can lose data, so only use them to extract a dump, never to run production. Once the server is up at the lowest working level, dump everything, stop it, move the corrupt tablespaces aside, start without the flag, and reload:

mariadb-dump --all-databases --single-transaction --routines --events > /root/all.sql

If the redo log was the problem (ib_logfile0), on a clean shutdown MariaDB recreates it. Do not delete redo logs on a server that has not shut down cleanly; that is how a recoverable crash becomes a rebuild from backup.

Run mariadb-upgrade

If the server starts but queries against mysql.* tables fail, privileges look wrong, or the log warns that tables need repair, the system tables are still in the old format:

mariadb-upgrade --force

WHM runs this as part of its upgrade workflow, but it is skipped if the server was not running at the end of the package step. It is idempotent, so run it whenever in doubt. Watch for Phase 4/8: Checking and upgrading tables errors that name a user table; those need mysqlcheck --repair individually.

Also note that since 11.x the canonical binaries are mariadb, mariadb-dump and mariadb-upgrade. The mysql* symlinks are still present in the cPanel packages, but scripts should move to the new names.

Stricter sql_mode and other 11.4+ defaults

The server is up, but customers report Incorrect integer value or Field 'x' doesn't have a default value errors on sites that worked yesterday. MariaDB’s default sql_mode already includes STRICT_TRANS_TABLES (but not ONLY_FULL_GROUP_BY), and MariaDB’s upgrade notes for 10.6 to 10.11, 10.11 to 11.4 and 11.4 to 11.8 list no change to it, so check whether an explicit sql_mode line from the old configuration was lost or changed during the upgrade. Check the running value:

mysql -e "SELECT @@GLOBAL.sql_mode"

The correct fix is to update the application, but on a shared server you cannot fix five hundred sites tonight. A pragmatic bridge is to set a looser server-wide mode (or restore the line the old configuration had) and let developers fix their code over time:

[mysqld]
sql_mode = "NO_ENGINE_SUBSTITUTION"

Add it to /etc/my.cnf, restart, and re-test. Reserved-word collisions are the other class of application break: ROW_NUMBER since 10.7 and CONVERSION and TO_DATE in 12.3 will break queries that use those as column names without backticks, and there is no server-side switch for those.

A common pitfall: mixed package sources

A server that once had a MariaDB repository from the vendor, or a Remi or CloudLinux MySQL governor package, can end up with binaries from one source and libraries from another after WHM’s upgrade. The symptom is a start failure mentioning a symbol or a version mismatch rather than a configuration error. Check:

rpm -qa | grep -iE 'mariadb|mysql' | sort
dnf repolist

Disable the foreign repository, run /scripts/check_cpanel_pkgs --fix, and let WHM’s Upgrade Database Version interface (called MySQL/MariaDB Upgrade before version 120) reinstall the consistent set.

Verify

A healthy recovery ends with all of the following true:

systemctl is-active mariadb
mysql -e "SHOW GLOBAL STATUS LIKE 'Uptime'"
mysqlcheck --all-databases --check-upgrade | grep -v OK
tail -5 /var/lib/mysql/$(hostname).err

No [ERROR] lines in the last minutes, no tables flagged by mysqlcheck, and the version reported by mysql -e "SELECT VERSION()" matches what WHM shows. Take a fresh full dump at this point, because the pre-recovery copy is now the only rollback and it will not be trustworthy for long. Our MySQL health snapshot script captures the state you will want to compare against next time, and the WHM upgrade guide covers the preparation steps (innodb_fast_shutdown=0, a clean stop, a verified backup) that avoid most of this in the first place.

Undo or roll back

  • Before editing configuration, copy it: cp -a /etc/my.cnf /root/my.cnf.bak and cp -a /etc/my.cnf.d /root/my.cnf.d.bak. To revert a commented-out option or the temporary sql_mode line, restore the copy (or remove the line) and restart MariaDB.
  • If forced recovery or the dump-and-reload goes wrong, stop MariaDB, move the current /var/lib/mysql aside and put /var/lib/mysql.pre-recovery back with cp -a, keeping ownership mysql:mysql, then start again.
  • A major-version upgrade cannot be undone in place: WHM does not support downgrading the database version, so the rollback is the pre-upgrade dump or a server snapshot.

MariaDB not starting after upgrade at a glance

MariaDB Not Starting After Upgrade – short answer
In short: A recovery sequence for a cPanel server whose MariaDB refuses to start after a version jump, covering removed configuration variables, InnoDB crash recovery levels, running mariadb-upgrade, and application errors caused by stricter sql_mode defaults in 11.4 and later.
MariaDB Not Starting After Upgrade – what this guide covers
MariaDB Not Starting After Upgrade: what this guide covers.
MariaDB Not Starting After Upgrade – questions answered
MariaDB Not Starting After Upgrade: the questions this guide answers.

Official documentation (checked 9 October 2026): Error Log · MariaDB Documentation · How to locate the MySQL or MariaDB log · cPanel Support · InnoDB System Variables · MariaDB Documentation · Server System Variables · MariaDB Documentation · Upgrading from MariaDB 10.6 to MariaDB 10.11 · MariaDB Documentation · Upgrading from MariaDB 11.8 to MariaDB 12.3 · MariaDB Documentation · SQL_MODE · MariaDB Documentation · InnoDB Recovery Modes · MariaDB Documentation · mariadb-upgrade · MariaDB Documentation · MySQL/MariaDB Upgrade (Upgrade Database Version) · cPanel & WHM documentation · Supported MySQL/MariaDB Versions · cPanel & WHM documentation

Related guides: Tuning InnoDB on MariaDB 11/12 for cPanel shared hosting: buffer pool, redo log and I/O · Fix “Too many connections” on MariaDB/MySQL (cPanel) · Installing and switching PHP versions in EasyApache 4 (8.2 to 8.5).

Frequently asked questions

Can I downgrade MariaDB on cPanel if the upgrade fails?

Not in place. MariaDB does not support running an older server on a newer data directory, and WHM only offers upward moves. The rollback is a restore of the pre-upgrade dump or a hypervisor snapshot, which is why both should exist before the upgrade starts.

How long does innodb_force_recovery take to get the server up?

Levels 1 to 3 usually bring the server up in seconds to a few minutes, because they skip or defer the recovery step that was failing. The time that matters is the dump afterwards, which runs at roughly the speed of a normal mariadb-dump of the whole data set.

Is it safe to delete ib_logfile0 to fix a MariaDB start failure?

Only if the previous instance shut down cleanly, in which case the log holds nothing and MariaDB recreates it. After a crash or a killed process the redo log contains committed changes that have not reached the tablespaces, and deleting it turns a recoverable failure into data loss.

Maintenance record

This guide changes servers, data or security settings, so we re-check it against current versions on a fixed schedule. Take a backup or snapshot before you start.

Maintained by
srvScripts editorial team
Supported versions
cPanel & WHM 136 and later with MariaDB 10.5, 10.6, 10.11, 11.4 or 11.8 (the versions cPanel lists for AlmaLinux/CloudLinux 8, 9 and 10 and Ubuntu 24); remarks about MariaDB 12.x apply only to servers running MariaDB outside cPanel's supported list.
Last full review
Next review

Share this guide

Free website test

Is your website set up right?

Check SSL, security headers, redirects, robots.txt, sitemap, llms.txt and security.txt in one test. It takes about 30 seconds.