OpenMRS standalone - MySQL binaries

I just downloaded the openmrs-standalone zip and uncompressed it, but I can’t see where the MySQL binaries are (I have to replace them by the MariaDB counterparts).

However if I run it the folder database magically appears. But this prevents me to check if the installation works with the MariaDB binaries. It’s a Catch-22 situation :frowning:

So the answer is: how can I replace those binaries without installing it?

1 Like

@lluismf, didn’t you say that you had already installed mariadb locally? Can’t you just change the runtime properties file to point to your local db, instead of the standalone one?

The standalone uses some magical (no longer supported) “mxj” connector that you don’t want to muck with if you can avoid it.

Yes, I have MariaDB installed (I dropped the openmrs schema created via the legacy webapp a few days ago).

I changed the standalone runtime properties like this:

 connection.url=jdbc:mysql://localhost:3306/openmrs?...

But when running the standalone it throws an exception:

Opening MySQL connection to create openmrs/test users
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

After that I created the user openmrs password test with the HeidiSQL interpreter but no success, same exception.

Even if I put connection user root and pwd in the properties file, it keeps using openmrs/test … apparently.

From:

… the default database name was changed to be the same as the web application name. Unless you are running openmrs standalone in Expert Mode the database will default to openmrs-standalone.

@lluismf, looking at

… it seems that the standalone is not prepared to simply use a different database. Some changes in that code may be required.

Thanks Geoffrey and Rafal, I ended up updating the MySQL binaries as pointed out by Daniel (instead of modifying the source code). It was kind of a hack but it worked.

1 Like