Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
in Q2A Core by


I saw a question about moving from mysql to postgres, and it seems your not supporting it.

Are there any plans of supporting or moving to other dbs?

I thought about moving to MariaDB. It's a community fork from MySQL, that being led by the original developers. They started because they didn't liked the way Oracle is taking MySQL.

The thing is - MariaDB is fully open source and free and maintainced by the community, unlike MySQL which was bought by Oracle, and maybe will not kept as open source or fully free (there already features that cost).

There are already several big sites that adopted MariaDB, such as Wikipedia.


So, what about moving the q2a core from MySQL to MariaDB?

To keep the project the most open source possible.

Currently, MariaDB is still kind of compatible with MySQL. Although it won't be forever. So I think it's a good time to consider it.


1 Answer

+3 votes
We currently have no plans to officially support other database systems.

In fact, I recently upgraded Q2A to use the mysqli_* functions instead of mysql_*. I looked at using PDO, because then in theory it would be simpler to change to another database. However, in practice all database systems use different dialects of SQL and in many cases the queries would need to be rewritten (for example, Oracle doesn't support the LIMIT clause).

If you want to support a completely different database system it's certainly possible! All database access is kept inside the qa-db-*.php files. First you would update the qa-db.php file to connect and run queries using your new database (e.g. replace 'mysqli' with 'pg' for PostgreSQL). It may work find now, but you would probably need to check the other qa-db-*.php files and update the queries accordingly.

Now, MariaDB is a slightly different case. It is supposedly a drop-in replacement for MySQL, so currently there shouldn't be anything we need to do to support it right now. You are right, it may not be like that forever, but I think until a lot of people have moved over from MySQL it will likely stay compatible.

Feel free to give it a try and let me know if you encounter any issues. If there is something we can do easily to support MariaDB without hindering MySQL support, I'll certainly consider it.

Hope that helps explain our position.
asked Mar 29, 2014 in Q2A Core by Nexxuss Q2A with oracle
@Scott, I feel we should officially start supporting Mariadb now. As of now it is drop-in replacement for MySQL but may not remain same in future.

I dont see bright future for MySQL as it is controlled by oracle now. Wikipedia also moved to Mariadb.