Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

magento2

I am running a magento 2.4 project but current not in position to update mysql version. any way to skip that error ?

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

like image 265
Soniya Garg Avatar asked Jan 25 '23 15:01

Soniya Garg


2 Answers

Yes you can try to change one file but can be some issues can occur in project while running.

Go to Vendor/Magento/Framework/DB/Adapter/SqlVersionProvider.php

Update function getVersionString and replace line

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

to

$sqlVersionOutput = '10.2.37-MariaDB';

This is temporary solution. So you should consider to update mysql version.

like image 36
Vipin Garg Avatar answered May 12 '23 03:05

Vipin Garg


An alternative solution if you are in a bind.

Edit file app/etc/di.xml

You can specify acceptable MariaDB versions here - currently 10.2-10.4

Example to allow MariaDB 10.5

<item name="MariaDB-(10.2-10.5)" xsi:type="string">^10\.[2-5]\.</item>
like image 196
elfling Avatar answered May 12 '23 05:05

elfling