5

We are upgrading from magento 2.3 to 2.4. Would like to know the compatible MariaDB version to be used for the upgraded magento version. As per official magento site, it mentions MySQL8.0 for on premise. And there is no mapping/compatibility available for this particular MySQL version from mariaDB.

Reference - https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/

Could you please suggest on the recommended MariaDB version to be used for magento2.4?

5 Answers 5

9

You Can modify the file: vendor/magento/framework/Test/Unit/DB/Adapter/SqlVersionProviderTest.php (Approximately Line 109 and add the MariaDB 10.5 Version to the Array:

'MariaDB-10.5' => [
                ['version' => '10.5.8-MariaDB-1:10.5.8+maria~bionic'],
                '10.5.'
            ],

and update the file: app/etc/di.xml (approximately Line 1818):

<item name="MariaDB-(10.2-10.5)" xsi:type="string">^10\.[2-5]\.</item>

from:

<item name="MariaDB-(10.2-10.4)" xsi:type="string">^10\.[2-4]\.</item>

Now I will note, it is NOT advisable to mode core files, however if you want it to run on MariaDB 10.5, that's how you can tackle it.

1
  • 2
    This works. New M2.2.4 install using MariaDB 10.5 with no issues after several months. Wondering if there is anything we should look out for?!? Seems very stable.
    – themew
    Commented Apr 22, 2021 at 22:13
2

According to the Magento 2.4 technology stack requirements supported databases are

  • MySQL 8.0 for on-premise installations
  • MariaDB 10.4 for Magento Commerce Cloud projects

https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements-tech.html

1
  • yes, this I have gone through and thats why this question. There is no mention of which maria DB for on-premise installation. So, wanted to know if any any particular mariadb version will work for on-premise installation for magento 2.4
    – NKumar
    Commented Aug 19, 2020 at 14:49
0

During my test installation of Magento 2.4, I get this error:

In SqlVersionProvider.php line 93:
                                                                                                                                                             
  Current version of RDBMS is not supported. Used Version: 10.5.4-MariaDB-1:10.5.4+maria~focal.Supported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4)  

I was trying to install it with MariaDB 10.5, but it is not supported. Now I am with MariaDB 10.4.16 and it works fine. I didn't try to install it all with MySQL.

3
  • ok, so maria DB 10.4.16 works with magento 2.4. on premise?
    – NKumar
    Commented Aug 19, 2020 at 14:49
  • I think yes, I am using 10.4.13-MariaDB
    – Nikola
    Commented Aug 21, 2020 at 8:36
  • ok, Thanks @nikola
    – NKumar
    Commented Aug 25, 2020 at 13:39
0

vendor/magento/framework/DB/Adapter/SqlVersionProvider.php

replace line no. 90

$sqlVersionOutput = $this->fetchSqlVersion($resource);

With

$sqlVersionOutput = '10.2.37-MariaDB'; // In the error you can see used version, you can set that value in the variable $sqlVersionOutput.


0

I was trying to upgrade Magento 2.3.7 to 2.4.3-p1 with MySQL 5.6.51. but it is not supported.

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

Now I am using MySQL-8, it is working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.