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
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
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
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
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?