Magento installation errors with MariaDB

Reading time: 2m

Magento is a mature e-commerce platform that provides powerful integration and is extremely customizable.  The software is designed to run on most LAMP stacks without a problem.  However, a lot of hosts will use MariaDB instead of MySQL due it’s increased performance and reliability.  If you’re reading this post, you may have seen an error that says:

Sorry, but we support MySQL version 5.6.0 or later!

Why this happens in the Magento installer

Magento2’s installer is hardcoded to check for a specific MySQL version, which they graciously let you assign to a variable.

What do I change to fix this?

Simply edit line #93 of setup/src/Magento/Setup/Validator/DbValidator.php and replace:

 $mysqlVersion = $connection->fetchOne('SELECT version()');

with

 $mysqlVersion = '5.6.1';

Then comment out lines 119 through 129.

That’s it! You should now be able to re-attempt an install, and should work fine with both MariaDB 10.0.x and 10.1.x branches.

Comments 1

Leave a Reply

Your email address will not be published. Required fields are marked *