MySQL to MariaDB switch

MySQL to MariaDB switch

by Chris Kenniburg -
Number of replies: 3
Picture of Particularly helpful Moodlers Picture of Plugin developers

We are updating servers this summer and switching to MariaDB.

Servers will be Ubuntu 16.04 and I am wondering if there is anything special I need to do?

In config.php I will switch 

$CFG->dbtype    = 'mysqli'; to mariadb, but is there anything else I need to be aware of?

Any configurations to MariaDB that help for Moodle?  


Thank you.

Chris

Average of ratings: -
In reply to Chris Kenniburg

Re: MySQL to MariaDB switch

by Ken Task -
Picture of Particularly helpful Moodlers

Recently, have been involved with an entity that is running $RHEL7.   Default DB is now MariaDB.  You might not have issues with getting the most recent MariaDB since Ubuntu has rep. for lastest/greatest stuff, but if you are migrating from MySQL, found an interesting thing about MariaDB ...

DB tweaks needed even before one can import ....

a 12Gig sql dump from MySQL 5.5 failed to import max_packet_allowed's default not enough.  max_allowed_packet=32

right after one imports the SQL dump from MySQL into MariaDB, one should run mysql_upgrade (commands in MariaDB are the same as MySQL).   And one might have to use he force option with mysql_upgrade  IF you are importing multiple MySQL 5.5 sql dumps into MariaDB 10.1..

https://mariadb.com/kb/en/mariadb/mysqld-configuration-files-and-groups/

Suggest running mysqltuner.pl often to begin with.

https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

Config files/purposes, etc. have changed locations in RHEL7 ... dunno about Ubuntu.   One now has a config file for server, one for client, etc.. :\

Those of top of my tired head ... be battling solr on CentOS 5 and 6 today ... as well as unoconv.  unoconv was fairly simple, but solr is proving to be a bear.

Predict using Apache solr for search in Moodle will be a support issue ... many will try ... many will fail ... many might say ... Oh, well.   It might have been nice, but ...'  IMHO, of course!

'spirit of sharing', Ken


In reply to Ken Task

Re: MySQL to MariaDB switch

by Ken Task -
Picture of Particularly helpful Moodlers

One more item ... kinda remembered it earlier but finally located my notes ...

Having to do with sql dump from MySQL 5.x that will be imported into MariaDB

https://mariadb.com/blog/mysql-mariadb-migration-handling-privilege-table-differences-when-using-mysqldump

From above link:
1. You should use --events --routines when using mysqldump.
2. You should use the --force option of the mysql client when loading mysqldump output as part of a migration from MySQL to MariaDB, and in any other circumstance where system tables might vary between the source and destination.
3. You must run mysql_upgrade after loading an SQL dump from any other version and/or any other software.


'spirit of sharing', Ken



In reply to Ken Task

Re: MySQL to MariaDB switch

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank You.  I am prepping for a totally new server and a mysql dump and import would be what we are looking to do.

Thank you for the pointers!

-Chris