admin/environment/database/mariadb (10.4.28-MariaDB)

From MoodleDocs

This error is often seen when you try to install a Moodle installer package for Windows of a branch under development.

You need a newer dtabase than the one present

  • And then you realize that the Moodle version you are trying to install needs a newer database version than the one enclosed in the Moodle installer package for windows (or for Mac OSX).
  • In the followin example, the package has MariaDB 10.4.28 and the server needs 10.11.0.
  • Updating MariaDB will not be easy for a non-technical Moodle user.
  • But there is a very simple hack that you could try FOR TESTING PURPOSES ONLY.
Note: NEVER DO THIS IN A REAL WORKING MOODLE SERVER.


  • You will hack the Moodle installer package for Windows that you have unzipped in the location that wiil be used (e.g.C:/TEMP/Mdev)
  • You need to modify the moodle/admin/environment.xml file using Notepad++ or any other editor you like (NOT MS Word).
  • You will need to locate the line that instructs Moodle to use the newer version (that is not included in the package).

NEW Search for the NEEDED MariaDB version.jpg

In this case the line is 4713.

This WAS the version needed.jpg

  • And you must replace that version with the version that is indeed included in the package.

This WILL BE the version used (hacked).jpg

  • Save the edited environment.xml file.
  • And now the installation should work and it will use the existing database included in the package.

Installation for Moodle 5 hacked successfully.jpg

  • Remember this hack was for testing purposes only.
  • You might encounter unforeseen side effects and problems; but it will not break the multiverse!
  • You should NOT attempt it in a real working Moodle server.