Magento 2: Utilizing MariaDB 10.6 with Magento 2.4.5 - Workaround Print

  • M2, MariaDB 10.6
  • 0

Magento 2.4.5 does not officially support MariaDB 10.6, which can cause issues when attempting to run the platform on this version of the database, such as where the minimum is MariaDB 10.6 with Ubuntu 22.04.2 LTS This article provides a workaround to use MariaDB 10.6 with Magento 2.4.5 by implementing a custom extension or modifying the Magento configuration file.

Issue:

When attempting to run the command `php bin/magento upgrade` with MariaDB 10.6, you may encounter the following error:

Current version of RDBMS is not supported. Used Version: 10.6.12-MariaDB-0ubuntu0.22.04.1. Supported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4).

This error occurs because Magento 2.4.5 only supports MariaDB up to version 10.4. Support for MariaDB 10.6 is introduced in Magento 2.4.6.

Workaround:

To resolve this issue, you can use a custom extension or modify the Magento configuration file as follows:

Solution 1) Use a custom extension:

Install the extension provided by ReesSolutions as described in this GitHub repository.

composer require reessolutions/db-override:*

After installing the extension, dump your database and import it again.

Solution 2) Manually edit the app/etc/di.xml file:

Update the Magento configuration file to support MariaDB 10.6 as per the file changes in this GitHub commit (applicable to Magento 2.4.6).

Edit the `app/etc/di.xml` file and replace the following line:

^10\.[2-4]\.

With:

^10\.[2-6]\.

By following these workarounds, you should be able to use MariaDB 10.6 with Magento 2.4.5. This solution involves either using a custom extension or modifying the Magento configuration file. However, please note that this workaround is unofficial, and it's always best to use officially supported versions of the software. It is useful to enable development to continue, with minimal effort. It is recommended to upgrade to Magento 2.4.6 or later to have native support for MariaDB 10.6.

References:

    1. Magento 2 GitHub Issue
    2. Magento 2.4.5 System Requirements
    3. ReesSolutions DB Override Extension

 

If you are a Create Hosting customer utilising our MageVPS Plan, feel free to submit a support ticket and we can investigate and take care of this issue for you.


Was this answer helpful?

« Back