Openmrs not connecting with DB.

Same issue with me here. Standalone 2.1.3, tomcat 9, mysql 8.0.1. I have entered the root password but not way. I even reinstalled mysql and made sure I set another password still same result. Its either the standalone has inherent issues or the mysql or the tomcat.

What is the username for the “root” password?

The standalone version has an embedded mysql and tomcat. Try unzip a fresh version of the standalone and run it again.

which set up type are you running for your standalone?

I want to use the enterprise war so as to deployed over the wireless network for client computers to access without starting an instance of the application on the server. For the embedded tomcat and SQL in the standalone version, they can’t be accessed by client PCs unless the application has been started on the server for it to invoke the embedded tomcat and SQL.

Something is definitely wrong. I spent 2 whole nights and can’t get around the issue of password.

Uninstalled the mysql 8.0.13 and deleted related folders in program files and program data. Restarted and installed mysql 5.6.42. Now its working… after 48hrs of non night sleep though. My hypothesis is that the components mysql 8, tomcat 9 and OMRS 2.x do not mix.

1 Like

sorry about that blocker but still it’s great that you have overcome it. Please could you share the steps you took to get unblocked to help someone out there who may be having the same problem. :smile:

MySQL 8 updated the authentication mechanism:

Unfortunately I haven’t figured out how to make it work without downgrading the authentication mechanism in MySQL.

I created a separate user in MySQL identified with mysql_native_password (from the openmrs-core repo) using something like: CREATE USER ‘’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘;’

I then granted appropriate privileges, and using the Advanced setup to have openMRS use the “new” user.

The most secure route would be to also create the OpenMRS database and ONLY grant the user privileges on that database (in the Advanced Setup you still create the tables automatically).

I am new to the forum, so apologies if I am breaking any rules.

Well I tried downgrading the authentication but still ran into issues. The most definite fix to this is downgrading the mysql version.

1 Like

Once you join this community your are a member whose opinion counts. Feel free to contribute and make openmrs the best open source.

Was the issue sorted out? if not share the output on the pastebin

Yes the issue was resolved after downgrading to mysql 5.x. Installation was successful.


Is this worth noting in the Troubleshooting Wiki page?

All our new findings are to be documented for the purpose of helping another person with the same issue.

I added it to the Wiki under “Install MySQL”. Thanks!


That is good :smile:

Hello. I’ve been facing the same problem for days now. I have no clue what’s wrong. Any help please?

Kindly share your error log for easy identification of the problem.

First of all, I didn’t know what’s the difference between “simple” and “advanced” mode of installation. I will use OpenMRS as a developper. Which mode is best? Second, when choosing advanced, I don’t know what I should write in the fields “database connection” and “database driver”. From where can I get these information?

Third, I’m trying to use a demo data (that I got from openmrs website). I do not only need the database structure but I would also want to have some ready data about patients and their information. Is that given in the demo data? (because I still didn’t get access to openmrs, still in the installation mode) Sorry for the long questions, thank you in advance!