ElearningWorld.org

For the online learning world

MoodleTechnical

Moodle – which database should you use?

Moodle Docs recommends MariaDB above MySQL, yet Postgres is default. What does this mean?

This is a series looking at the choice around which database to use for a Moodle site.

Let’s look at some of the basics in this post…

Installing a new Moodle site you have 5 main choices for the database, as indicated in Moodle Docs:

  • PostgreSQL (recommended)
  • MariaDB (recommended)
  • MySQL
  • MSSQL
  • Oracle (not recommended)

PostgresSQL

A new install of Moodle will default to use PostgreSQL. Although Postgres is great, especially for larger sites, it is ver different to MySQL, and if you are only familiar with MySQL you will likely want to change to this.

We will talk about Moodle and Postgres later, but if you are eager to know more take a look here:

https://docs.moodle.org/36/en/PostgreSQL

Oracle

Oracle is technically supported, but it is generally slow, and hardly any core Moodle developers use it for development.

Microsoft SQL

Interesting the main Moodle documentation for SQL says nothing except “Microsoft SQL Server is one of the databases natively supported by Moodle.”

Put simply, although Moodle will work with MSSQL, in every case we have ever seen it run horribly, it’s slow, and difficult to setup and maintain.

MySQL

MySQL was for many, many years the preferred database for Moodle. That has only changed recently, and in fact we would suggest that for 99% of cases running on MySQL is still a great option.

MariaDB

This is now the preferred option (according to Moodle Docs) for most  scenarios.  MariaDB is incredibly close in nature to MySQL, and in theory totally compatible.

Summary

If you are in a Microsoft Windows only environment, then Moodle will run on MSSQL, but don’t expect it to be reliable, or fast.

If you have to use Oracle, it will work, but you will have problems, and there is little community support outside of Oracle to help solve.

Postres is great, but there are challenges, and unless you have knowledge of Postgres there are better options.

MySQL is the traditional database for Module, and works well.

MariaDB may provide better performance than MySQL.

In the next post on Moodle database, we will look at the differences between MySQL and MariaDB, and try to see why we might consider each.

blank
Follow me

blank

EdTech Geek

Server administrator, solutions architect, developer, EdTech enthusiast, and park-time geek.

Add a reply or comment...