I’ve been trying from days to setup openmrs server using sdk in my laptop. (I’m trying to setup ‘Distribution’ using Reference Application 2.6.0 ) I need to setup data integrity module over it after that. @ssmusoke and @dkayiwa helped me to a large extend but now I’m stuck at a point. I’m basically getting ‘Failed to import database’ error which is due to unknown variable ‘storage_engine’ .
Please note that I’m not using ‘storage_engine’ in database connection string. See full log here: https://pastebin.com/cxHuFTSj
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
MySQL
mysql Ver 14.14 Distrib 5.7.18, for osx10.12 (x86_64) using EditLine wrapper
As many of you know its been almost 2 weeks since starting of community bonding and I’m really need to setup the module otherwise it will be too late.
I really appreciate any kind of help. Thanks
@ssmusoke, dkayiwa suggested changing database connection uri (refer here for the fix suggested ) to jdbc:mysql://localhost:3306/@DBNAME@?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8 which I did, but I’m still getting same error.
If you don’t mind, you could downgrade to MySQL 5.6 and install this. I actually setup the Reference Application 2.6 and also 2.7-SNAPSHOT using OpenMRS SDK latest version having MySQL 5.6.
You can upgrade to the latest version of the OpenMRS SDK by running:
mvn openmrs-sdk:setup-sdk -U
There was no error on SDK or Distribution for me.
Note that for running a distribution you will most likely need to have MySQL 5.6 installed.
@shivtej, looking at the pastebin I see your error message is
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
This implies that you’ve got the wrong db connection string, username, or password. Have you verified these by connecting to mysql with some other utility?
Also, have you tried with MySQL 5.6? What I personally do in development is that I run mysql via docker, so I can try different versions, easily reset everything, etc.
I once saw such error though I can’t remember the exact error. But that’s because I didn’t have mysql installed. What about try running sdk-setup with a H2 database instead of mysql?
Update
Ohh I see! H2 is not an option for you. Never mind
I also had a similar problem: trying to create a server but once I downgrade from mysql 5.7 to mysql 5.6 everything worked perfectly.
your recommendation was really helpful