Openmrs not connecting with DB.

@amenikh try going through this conversation and see how it can help out

1 Like

Can you paste the contents of your tomcat log file at

thank you very much. It turns out the explanation on the wiki I followed was missing a detail. I was placing the legacy file in another folder appdata/openmrs/modules while the right one was applicationdata/openmrs/modules Now I’m struggling with the login credentials. Used the ones I set but they don’t work. I guess the version I downloaded has preconfigured credentials that I ignore.

1 Like

Try: admin/Admin123 or admin/test

thank you so much! admin/test worked


I have soloved this by going through this >>

mysql was not allowing local host to modify database

Hi, I ran into the same issue, I downgraded my MySQL version to 5.48 and it seemed to work. Hope that helps!


@mohilpalav thanks for sharing your solution here

1 Like

The downgraded version is 5.6.48 which works fine.

1 Like

Thanks I had to do the same thing


I’ve been searching for hours but can’t find a good source to find instructions on how to downgrade mySQL. Can you please share how you did it?

Which MySQL version do you have?

Thank you for such a quick response @dkayiwa My SQL version is: 8.0.21

And which OpenMRS version are you running?

I believe i am running OpenMRS 2.5.0

I was able to downgrade mySQL using Docker however the issue still persists:

Unable to create the database. The password might be incorrect or the database is not started. ???Error executing sql: create database if not exists ? default character set utf8 - Could not create connection to database server. Attempted reconnect 3 times. Giving up.???

I am running mySQL 2.5.0. Ubuntu 20.0.4. OpenJDK version 1.8.0_265. Apache Maven 3.6.3

@shayyan Drop the database and delete the runtime properties file.

It might come in handy if you don’t know where the properties file is -> how to access the runtime properties file.

@achilep i couldn’t locate the file at /usr/share/Tomcat9/.OpenMRS so i couldn’t delete it. Also, during the OpenMRS Core 2.5.0 set up, it mentions that the runtime properties file being used is from "/home/shayyan/.OpenMRS/ However, i checked and there is no runtime properties file in this location and therefore the following error is being produced.

Also, i am using Port 8181 if that makes any difference. Port 8080 is taken and it won’t let successfully run just mvn jetty:run. I have to use mvn -Djetty.port=8181 jetty:run

1 Like

@shayyan try with mysql 5.6 or 5.7

1 Like