Trouble setting up openmrs sdk

Whenever I run mvn openmrs-sdk:setup, I get the following error:

[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.0:setup (default-cli) on project referenceapplication: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 ->

Same as this:

See the paste bin for error log: https://pastebin.com/uYJiEUJt

PS: I have MySQL installed and running

1 Like
Failed to connect to the specified database jdbc:mysql://localhost:3306/server?au
toReconnect=true&sessionVariables=storage_engine%3DInnoDB&useUnicode=true&charac
terEncoding=UTF-8

Please double check whether MySQL server is up and running while you are running these SDK commands. Make sure that you have provided the correct credentials. :slight_smile:

MySQL is running

Are you able to connect to it from a GUI like MySQL browser or something else? Or even from command line?

Yes I am. I have MySQL Workbench connected

What database name and port number have you connected MySQL Workbench to? Are you also using the same user name and password?

Yes I am. I even created a database with the name server to match what the sdk server expects. Workbench is connected to Mysql on port 3306, same as that expected by the sdk installer

Can you paste the entire log at pastebin.com?

That is from the very time you run the sdk command.

Fixed. giving the root user a password fixed the issue

Were you then able to create a local Platform/Distribution server?

Yes. Just did that

A piece of advice here. We learned from OpenMRS conference 2017 hackathon that on Windows, you should avoid using Bash or any other Linux shell, instead use PowerShell or just Windows command prompt. Otherwise you may get the same data connection error.

2 Likes