Moodle 2.1 and mariaDB 5.2.7

Moodle 2.1 and mariaDB 5.2.7

by Miquel Escarrà -
Number of replies: 5
I try to install latest version 2.1 locally for testing purposes with mariadb as database server. I always get this error: Debug info: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' INSERT INTO mdl_message_providers (name,component,capability) VALUES(?,?,?) [array ( 0 => 'notices', 1 => 'moodle', 2 => 'moodle/site:config', )] Stack trace: * line 396 of /lib/dml/moodle_database.php: dml_write_exception thrown * line 878 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() * line 920 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw() * line 237 of /lib/messagelib.php: call to mysqli_native_moodle_database->insert_record() * line 1369 of /lib/upgradelib.php: call to message_update_providers() * line 182 of /admin/index.php: call to install_core() Is this a database problem? Miquel
Average of ratings: -
In reply to Miquel Escarrà

Re: Moodle 2.1 and mariaDB 5.2.7

by Colin Fraser -
Picture of Documentation writers Picture of Testers

AFAIK, MariaDB is an open source database server developed as an offspring of a number of other db servers. As it is Open Source, it has a number of features and possibilities that the usual suspects and some proprietal DB servers do not. The trouble is that each DB server is implemented using its own transactional layer. It is this layer that Moodle needs to work with that allows it to talk to the database. Currently, Moodle has developed four such interfaces, MySQL, PostGres, MSSQL and Oracle, so it will only work with those four databases. Try using one of them and see if you get a better outcome. 

In reply to Colin Fraser

Re: Moodle 2.1 and mariaDB 5.2.7

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

MariaDB is a fork of MySQL that is not owned by Oracle. I would guess that if you tell Moodle that you are using MySQL, then it will happily talk to a MariaDB database, then it will mostly work.

However, you have to configure your database correctly, whichever database it is. It seems that you have tried to set up some sort of replecation (or something else that requires binarly logging) with an incompatible transaction isolation level. Don't do that!

In reply to Tim Hunt

Re: Moodle 2.1 and mariaDB 5.2.7

by Miquel Escarrà -

Thank you, Tim.

You where right: MariaDB starts with replication mode on (moodle 2.0.3+ does not gets affected by this option, and installs tables without switch it off)

Read on http://www.ispirer.com/wiki/:

You need to change the binlog mode to either ROW or MIXED in order to run the load of the data into the database

mysql> SET GLOBAL binlog_format = 'ROW';

So i did it and all tables were created.

Miquel


Average of ratings: Useful (1)
In reply to Miquel Escarrà

Re: Moodle 2.1 and mariaDB 5.2.7

by dibesh shrestha -

Hi Miquel,

Will this work with higher version of moodle too? Can mariadb be use to share same  moodle database between two or moodle instances if it can be clustered?Will moodle run smoothly this way?

Thank you for your advice in advance.

In reply to dibesh shrestha

Re: Moodle 2.1 and mariaDB 5.2.7

by Guillermo Madero -