1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Article

How to Install MariaDB

MySQL/MariaDB is a popular relational database management system that is considered a core service on most cPanel systems. This interface allows users to upgrade their MySQL/MariaDB server to a newer version. Here are the contents of this article:
Important notes:
  • We strongly recommend generating a backup of your databases before upgrading the database version or moving from MySQL to MariaDB.
  • This feature doesn't support downgrades of database engine versions. After you upgrade your system, you cannot switch back to the lower version.
  • Switching from MySQL to MariaDB is considered an upgrade. Once you change the database engine to MariaDB, you cannot revert to MySQL.
  • Before upgrading, check for any known incompatibilities between your MySQL release and the MariaDB release you wish to move to. Please see the MariaDB external documentation available online for more information about these incompatibilities. Here are some of them:
  • We don't support the use of MySQL’s sha256_password plugin for MySQL versions  5.7 and 8.0 or MariaDB 10.2 and 10.3.
  • The phpinfo file may display a different version of MySQL than your selected version.
    • The API version 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. Since cPanel & WHM updates MySQL RPMs whenever Red Hat releases new updates, this could automatically break thousands of servers within a few hours. Due to this, cPanel, LLC always builds Apache and PHP with the -builtin option.

What versions are available?

MySQL

For MySQL, if your server currently uses MySQL 5.6 or earlier and you want to upgrade it to MySQL 8.0, you must first upgrade the server to MySQL 5.7.

The available MySQL versions are as follows:

  • MySQL 5.7
  • MySQL 8.0

MariaDB

For MariaDB, here are the available versions:

  • MariaDB 10.2
  • MariaDB 10.3
  • MariaDB 10.5
  • MariaDB 10.6

How to upgrade or install MariaDB via WHM

 To upgrade or install MariaDB:

  1. Log in to WHM.
  2. Using the Search pane on the left, search for MariaDB.
  3. Select MySQL/MariaDB Upgrade

    MySQL/MariaDB Upgrade

  4. On the MySQL/MariaDB Upgrade section, select the MariaDB version you wish to upgrade to.
    • Make sure to read MariaDB's documentation to know the incompatibilities between versions before upgrading! This especially applies to upgrading from MySQL 8.0 to MariaDB 10.x.

    MySQL/MariaDB Upgrade

    • Click on the Continue button.
    • Check any warning your server may have found. Do not proceed if you are unsure of what these warnings mean.
      • If you upgrade from MySQL version 5.7 to 8, the Upgrade Check via MySQLShell (optional) section will be displayed. This utility checks whether the upgrade will work. To run the MySQL Upgrade Checker utility, click Install and Run Checker. Wait for the upgrade check results.
    • Select the checkbox next to each warning if you acknowledge the potential consequences of the upgrade, then click Continue.
    • Select the preferred upgrade type.
      • Unattended Upgrade - Automatically upgrades MySQL or MariaDB.
      • Interactive Upgrade - This means you will be prompted to continue through each step throughout the upgrade process. You may also be provided with additional tasks you need to complete before continuing through the upgrade.
    • Click on Continue to proceed. The upgrade process interface will be displayed.
    • Once the upgrade is done, a notification will be displayed, showing you whether the upgrade is successful or if there are errors that you need to address to complete the upgrade.

    Upgrade Logs

    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:
    • YYYY — Four-digit year
    • MM —  Two-digit month
    • DD — Two-digit day
    • hh — Two-digit hour
    • mm — Two-digit minute
    • ss —  Two-digit second
    Chat
    Close