???Unable to connect to database??????

Hi everyone I am new to openMrs. I have been trying to install openMrs by using OpenMRS SDK for many days because i want to start contributing and i have been facing many issues and I have been reading many answers but no answer has helped me to solve my issue. I have followed the instructions in the SDK development installation and every thing has worked well until the last stage. problem description. First step: I install SDK by using command ‘mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk’. and it worked fine. Second step: I set up the server by using command ‘mvn openmrs-sdk:setup’ and it worked fine

Third step: I run the server using command ‘mvn openmrs-sdk:run’ and it worked fine. Fourth step: The problem occurs here when i open http://localhost:8091/openmrs/ in a browser. it is saying ???Unable to connect to database???. error details:

Are you able to connect to your database, with the same account, using any other client?

@bahagt on top of @dkayiwa 's question, which MySQL version are you running?

@dkayiwa I am very sorry but i don’t fully understand your question because maybe it is my first time to interact with database

@herbert24 I am using MySQl 8.0

I also had the same issue when reinstalling openmrs sdk. It worked fine with the Reference Application 2.12.0 - SNAPSHOT version of the distribution. But the Unable to connect to database error occurred when running the older versions. (I am using mysql 8.0)

1 Like

For MySQL 8 you need to select platform 2.4 and above or reference application 2.12.0-SNAPSHOT

1 Like

@bahagt the above comment from @dkayiwa should get you moving :point_up:

1 Like

@dkayiwa @piumal1999 @herbert24. I don’t know how to thank you all. Thank you very much. I have spent alot of time on this issue without any progress but you solved it in a day. Thank you very much and i appreciate your time and efforts

@dkayiwa Aside from this issue. I wan to start contributing. I know java, object oriented programming, data strucutres and algorithms, and sql. My question is. Should i spent some time learning hibernate and spring and then start contributing or it is better to start now. I want to contribute to the core

By the way how you solved this database connectivity issue? @bahagt

I have followed Daniel Kayiwa advice which is ( For MySQL 8 you need to select platform 2.4 and above or reference application 2.12.0-SNAPSHOT )