I assume you’re aware that MariaDB isn’t supported for Ghost, right?
Docs here:
Recent discussion about MariaDB non-support (also links an older thread): Does Ghost work with MariaDB - #7 by vikaspotluri123
I’m not sure you’re going to find the expertise you’re looking for here, so you may want to cross post your question in a MariaDB forum also.