Moodle Installation error – Database MySQL version 5.5.31 is required and you are running 188.8.131.52.1.13
Yesterday while I was installing the Moodle 3.1 on my recently formatted laptop for development purpose in a XAMPP environment, I faced a peculiar error which halt the installation process on the Server checks page.
The installation process was showing the error in the very first line as “version 5.5.31 is required and you are running 184.108.40.206.1.13” for MySQL Database – 220.127.116.11.1.13-Mariadb.
After performing a quick search through Google forums, I stumbled upon the following solution suggested by Marina Glancy in one of the Moodle forums which worked for me:
you need to edit your config.php and specify database as “mariadb” instead of “mysqli”.
To address the same issue, a new Moodle tracker issue is opened with ID – MDL-51080 here. The tracker issue is still unresolved so all the Moodlers who faced this issue can continue by following the above solution till any update is released.
Going in the technical details of the issue on the tracker issue, I found:
WHAT ACTUALLY HAPPENS:
Moodle’s upgrade check gives only the error: “version 5.5.31 is required and you are running 18.104.22.168.0.20”. This error leads to things like issue #45070 and not the fix in the blog.
WHAT SHOULD HAPPEN:
the mysql-version checking code should generate an explicit recommendation “please change dbtype to mariadb in config.php” if it detects -10. in the version string.
The same issue might occur during the upgrade process also as many OS have switched from MySql to MariaDB.
Have you also faced the same problem while installing or upgrading your Moodle site? How do you overcame the problem? Share your creative ideas in the comments section below.