Magento 2 command line issue: Current version of RDBMS is not supported

When you are running the command line php magento setup:upgrade and facing the issue:

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

it means MariaDB is specified acceptable verion 10.2 - 10.4, if you want to use a greater version of MariaDB, you have to extend the regexp in app/etc/di.xml like following:

Edit file app/etc/di.xml

<type name="Magento\Framework\DB\Adapter\SqlVersionProvider">
<arguments>
<argument name="supportedVersionPatterns" xsi:type="array">
<item name="MySQL-8" xsi:type="string">^8\.0\.</item>
<item name="MySQL-5.7" xsi:type="string">^5\.7\.</item>
<item name="MariaDB-(10.2-10.4)" xsi:type="string">^10\.[2-4]\.</item>
</argument>
</arguments>
</type>

Original:

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

Change to your version (example, current version 10.6.18-MariaDB):

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

it will work again

Back to Top