I posted a humble example of using MySQL / MariaDB, Postgres and SQLite.
The example is in SQLite, but simply change the file definition to use in MySQL (which is the same as MariaDB).
I hope you find it useful.http://hmgforum.com/viewtopic.php?f=37&t=4293#p40736
Regards,
Daniel Amarante