We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

Child pages
  • MySQL or MariaDB Upgrade
For cPanel & WHM version 84
Skip to end of metadata
Go to start of metadata

 (WHM >> Home >> SQL Services >> MySQL/MariaDB Upgrade)


This interface allows you to manage MySQL® or MariaDB® version upgrades (for example, when you upgrade from MySQL 5.6 to 5.7). After you select your MySQL or MariaDB version, WHM automatically keeps your database engine up-to-date. This means, for example, that whenever the vendor releases a new patch for your version of MySQL or MariaDB, WHM automatically applies the patch to your installation.


  • We strongly recommend that you back up your database before you upgrade your database or change to MariaDB.
  • This feature does not support downgrades of database engine versions. We strongly recommend that you do not attempt to downgrade MySQL or MariaDB.
  • The system considers MariaDB to be an upgrade from MySQL. If you change the database engine to MariaDB, you cannot change back to MySQL.
  • Do not upgrade from MySQL 5.7 to MariaDB 10.2 or 10.3. Those versions of MariaDB do not contain the sys schema, which will cause check table calls to fail. If you do accidentally upgrade from MySQL 5.7 to MariaDB 10.2 or 10.3, you must manually remove that schema from your databases.
  • If CloudLinux's™ MySQL Governor exists on your server, MySQL upgrades will not work via this interface. If you wish to remove MySQL Governor, read CloudLinux's MySQL Governor documentation and research how this affects you.
  • We do not support the use of MySQL's sha256_password plugin for MySQL 5.7, MariaDB 10.2, or MariaDB 10.3.
  • The phpinfo file may display a different version of MySQL than the version that you select.
    • The API version that you see in the phpinfo file is the built-in MySQL API that PHP includes.

    • If the buildapache application uses the MySQL libraries and headers on the server itself, and you change the MySQL version, Apache cannot function correctly. Because cPanel & WHM updates MySQL RPMs whenever Red Hat releases updates, this could automatically break thousands of servers within a few hours. For this reason, cPanel, L.L.C. always builds Apache and PHP with the -builtin option.

  • You must use MySQL version 5.7 on Amazon Relational Database™ Service (RDS) servers. We do not support MariaDB on Amazon RDS servers.

Available versions

The following versions of MySQL are available:
  • MySQL 5.6
  • MySQL 5.7

The following versions of MariaDB are available:

  • MariaDB 10.0
  • MariaDB 10.1
  • MariaDB 10.2
  • MariaDB 10.3

Upgrade MySQL or MariaDB

To upgrade your server's version of MySQL or MariaDB, perform the following steps:

  1. Select the version of MySQL or MariaDB that you wish to upgrade.


    Do not upgrade from MySQL 5.7 to MariaDB 10.2 or 10.3.


    To reinstall your database, select your current version of MySQL or MariaDB.

  2. Click Next. A new interface will appear with warning messages about the upgrade process.


    The system validates the /etc/my.cnf file during the upgrade.

  3. Select the checkbox next to each warning to acknowledge that you are aware of the potential consequences of the upgrade.
  4. Click Continue.
  5. Select the type of upgrade that you wish to perform:
    • Unattended Upgrade — This option automatically rebuilds Apache and PHP with the last saved defaults. It also automatically updates Ruby Gems and rebuilds Apache and PHP.

    • Interactive Upgrade — This option steps you through the upgrade process. This process includes the Ruby Gems update, the MySQL or MariaDB upgrade, and the Apache and PHP rebuild.

  6. The upgrade process interface appears.
    • Select or deselect the Autoscroll output checkbox to change whether the output display scrolls as the upgrade runs.

    • When the upgrade finishes, the interface displays the following message:

      Upgrade finished successfully.


      You must now recompile any software on your system that depended on the old version of MySQL or MariaDB so that it is compatible with the new version.

  7. Click Continue.
  8. Your server checks whether you must recompile any Ruby Gems. Follow the instructions and then click Continue.

MySQL upgrade log

The system stores the MySQL and MariaDB log files in the /var/cpanel/logs directory. 

The log files use the mysql_upgrade_log.YYYYMMDD-hhmmss naming convention with the following designators:

YYYYFour-digit year.
MMTwo-digit month.
DDTwo-digit day.
hhTwo-digit hour.
mmTwo-digit minute.
ssTwo-digit second.

Additional documentation

There is no content with the specified labels

There is no content with the specified labels

There is no content with the specified labels