Wrong Database Connection URL

Hello, Has anyone come across a situation where the mysql connection url generated by openmrs-sdk or the default url during the initial setup of openmrs is wrong? This is the format of the url connection.url=jdbc:mysql://localhost:3306/openmrs?autoReconnect=true&sessionVariables=storage_engine=DInnoDB&useUnicode=true&characterEncoding=UTF-8 The & is always missing after the equal sign between sessionVariables and storage_engine I have completely failed to create a new server using latest sdk. The error is below Failed to import database: Could not create connection to database server. Attempted reconnect 3 times. Giving up. Unknown system variable ‘storage_engine’.

In the old sdk, the database setup would fail but at least the server is created and hence I would edit that url, but now the server is deleted once it has failed. While setting up openmrs manually, I always have to edit this url during setup

I need help especially on sdk since I have failed to setup a server

Is this of any help? https://issues.openmrs.org/browse/TRUNK-4800

Yes it is the same issue. But the solution is proposed according to me does not solve the problem or if it solves, it is still a wrong url. The syntax of JDBC URL is jdbc:mysql://[host1][:port1][,[host2][:port2]]…[/[database]] » [?propertyName1=propertyValue1[&propertyName2=propertyValue2]…] Or jdbc:mysql://address=(key1=value)[(key2=value)]…[,address=(key3=value)[(key4=value)]…]…[/[database]]» [?propertyName1=propertyValue1[&propertyName2=propertyValue2]…] https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html

Proposed one is jdbc:mysql://localhost:3306/@DBNAME@?autoReconnect=true&sessionVariables= mysql://localhost:3306/@DBNAME@?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8 mysql://localhost:3306/@DBNAME@?autoReconnect=true&sessionVariables=default_storage_engine=InnoDB&useUnicode=true&characterEncoding=UTF-8

https://github.com/openmrs/openmrs-core/pull/1625/commits/35180edc9e3664ed6549ab58cdd8419ca8f8aaf2 https://github.com/openmrs/openmrs-core/pull/1625/commits/35180edc9e3664ed6549ab58cdd8419ca8f8aaf2

You realize that session variables is a different property from storage engine, so & sign is supposed to separate each property which is not the case with proposed url Also the default_storage_engine is not a session variable, but innoDB is a storage engine.

I suggest you remove sessionVariables property since it always empty, because based on mysql documentation, sessionVariables is supposed to be key_value pair separated by comma.

Which exact platform version is your SDK build targeting?

I am targeting 3.9.0 on java 8 using mysql 5.7

I mean OpenMRS platform version.

I fixed this with: https://issues.openmrs.org/browse/SDK-219 @raff since a big number of new comers are using MySQL 5.7 and hence end up with this problem, do you think you can release a new version of the SDK that has this fix?