Support for MariaDB: Looking for volunteers

Do you believe OpenMRS should be using MariaDB? If so, how can you help make this happen? :slight_smile:

You may have heard this:

“OpenMRS uses Hibernate for database access, which means it can run on any popular database engine.”

We’ve been making that claim for a long time. Now, with your help, we’d like to start living up to that claim. In a recent Developers Forum, we decided our first in formally supporting non-MySQL databases would be MariaDB support. As a result, we created an epic:

OpenMRS should run with MariaDB (TRUNK-4689)

We are looking for volunteers to help achieve this goal. Do any of the following apply to you?

  • You have at least 2-3 hours a week available and are willing to help by leading this effort.
  • You are aspiring to reach /dev/5 (leading the community effort to reach a road map milestone is a great way to demonstrate community leadership)
  • You have experience configuring builds in Bamboo and want to donate some time.
  • You have at least a couple hours a week available and would like to help.
  • You have database experience/expertise and are will to help try to answer questions.

If you are interested in helping in any way, we’d love to hear from you. Let us know by replying to this thread.


I believe OpenMRS should be 100% DB-agnostic.


Personally, I agree, and my perception of the 2015-04-16 developers forum is that most people there to discuss it agreed, too.

But we also agreed that:

  1. Ensuring we are DB agonstic would probably have to be a gradual process, and
  2. As long as we are shipping a “standalone” installation we will need to have a “default” or "recommended DB.

So the ideas about maintaining continuous integration tests with at least 2 databases was seen as a step in that direction, with MariaDB being the most logical next choice for testing against multiple DB’s.

Someone can feel free to add more here if my perceptions are wrong or if you disagree. :slight_smile:

1 Like

@lluismf would you be able and willing to help us get OpenMRS using MariaDB?

1 Like

Yes I guess I can spare a couple of hours per week. Not sure about the tasks to do though.


Thanks a ton, Lluis!

You allude to one of the main humps we have to work through in the community. Everyone realizes that activities like this are important, and want to contribute, but it’s like trying to figure out how to take the first bite of an elephant.

Putting that aside for a second, the immediate task is to demonstrate OpenMRS working operationally on top of MariaDB. At one point, I played around with this, and got it a big part of the way there, but it failed during the installation process. I think some of the SQL scripts that we use to inject demo data might be MySQL syntax specific.

So, if you wanted to get started… simply trying to install OpenMRS, swapping out MariaDB for MySQL, and help us troubleshoot the issues that might (or might not) come up. Once we get through that step, it seems like getting consensus on what a testing strategy for MariaDB (or any database technology) would look like, in order for us to feel comfortable putting that out in the wild.

Of course, there would be some opportunities to wire MariaDB into the continuous build processes as well that create a “release” for general consumption.

I think given the direction that MySQL is heading, we probably want to move away from it being the bundled package at some point.

I’m sure @burke and @darius will correct some of what I’ve said. :smile:

I think the main thing that this task is missing is someone willing to “own” it and wake up thinking about it from time to time until we get it resolved/wrapped up.

I for one will commit to working alongside you until we get there.


I’ve installed OpenMRS several times (even dropping the DB) and the demo data never was inserted. So maybe it’s not a MariaDB related problem.

I will try and start creating subtasks.

Update: I removed MySQL from my machine, installed MariaDB 5.5 and installed a fresh OpenMRS without problems. All the scripts (demo data and all the liquibase changes) ran fine. Now it’s just a matter of testing. Even the connection string is compatible.

1 Like

Hi @lluismf,

Anything new going on with this?

Yes, I just tested the standalone and it works, details here:

Needs more testing of course, but the initial impression is good.

This week I plan to install the WAR on Tomcat to test the Reference Implementation with MariaDB not embedded. I already tested the legacy UI and all the liquibase DML was executed without problems, so I expect the same behaviour.


@jthomas It will be great to use MariaDB for OpenMRS at least because of it’s licencing. I’m not very confident with MySQL in Oracle’s hands.

@lluismf Nice will assist if I have some spare time. My GSoC project is somehow related to this :wink:


I already tested the basic scenarios (legacy, embedded and reference application running on Tomcat). Next step is CI but it’s not in my hands.

@cintiadr, would you be willing/able to assist @lluismf and/or @ch3ck as they try to get a project running on CI to build OpenMRS against MariaDB to reach one of our technical milestones for OpenMRS (i.e., what @darius was saying here)?

1 Like

Sure thing, I will continue the discussion on the JIRA issue.

Hi @cintiadr,

Since @michael helpfully reminded us we shouldn’t have substantive conversations in the issue tracker, we seem to have lost the thread…

So, what do you think about how to approach this.

I can try to modify the base test classes to allow using a database other than H2, depending for instance of a system property (now is hardcoded to use the in-memory one). But IMHO this should be out of the scope of MariaDB testing. This doesn’t mean that I don’t want to do it, but it won’t be a couple of hours.

A better way to test MariaDB is to update the wiki suggesting new developers to use it instead of MySQL, and issues will arise fast.

1 Like

@lluismf, definitely asking all new devs to use MariaDB instead of MySQL would solve some problem, but I think our real goal is to grow to the point where we support multiple databases, not just (a different) one.

Are you interested in working with @cintiadr to figure out how to achieve that, through some use of testing and CI?

Yes I do, it’s only that I don’t have much time to spend.

1 Like


I don’t have heaps of time this week or the next, but after 18th I should be much more free.

What I’ve done is installing docker on the agents.

I have this pretty simple build starting mariadb and kill it at the end. Is there any super simple way to test importing data? Any arbitrary username/password can be passed.

Newest version of Bamboo has a nicer support to docker, we can upgrade Bamboo those tests work.

1 Like