As part of improving standalone efforts (GSOC 2025) within the OpenMRS, I would like to propose that we officially support the MariaDB JDBC URL and Driver in addition to the existing MySQL setup.
Problem:
Currently, OpenMRS primarily configures JDBC connections using MySQL conventions
jdbc:mysql://localhost:3306/openmrs
However, when using MariaDB, using the MySQL JDBC URL has lead to compatibility issues with recent versions of the MariaDB server (11.4.5). For instance, am encounter errors such as:
java.sql.SQLSyntaxErrorException: Unknown column ‘RESERVED’ in ‘WHERE’
which call for a solution discussed here
This arises because MySQL and MariaDB have diverged slightly in metadata handling, and the MySQL Connector/J driver does not guarantee compatibility with newer MariaDB versions.
Proposed Solution:
Allow specifying MariaDB-compliant JDBC URLs in runtime properties and configuration wizards
jdbc:mariadb://localhost:3306/openmrs
Include the official MariaDB JDBC Driver (com.mysql.cj.jdbc.Driver) as a supported dependency during setup (openmrs core).
Detect database type (MariaDB vs MySQL) early in setup to avoid known issues with reserved word lookups and changelog parsing in Liquibase.
For the existing drivers supported u can check out here
I’d love to hear your feedback or if others have run into this issue.
Definitely worth supporting, but we should also be keen just incase of Liquibase compatibility issues, driver dependencies, and ensuring backward compatibility with MySQL users. Happy to help verify this across test setups.
Oh yes, that would have been a great idea. However, earlier versions had compatibility issues with M1 and M2 Mac silicon chips. That’s why they opted for a newer version (11.4.5).
Note:
Older versions of MariaDB4j lacked support for Apple Silicon (M1, M2+), which remains a critical issue on those machines.