MariaDB: minor refactor

Signed-off-by: swpd <swpdtz@gmail.com>
MariaDB: change field `mysql` from pointer to object

Signed-off-by: swpd <swpdtz@gmail.com>