Hi, I attempted to install the Simple version of OpenMRS on MySQL 8/Windows using the default “caching_SHA2_password” authentication settings and ran into an issue that it cannot connect. I was able to work around the root authentication issue by changing the authentication scheme to “standard” per the discussion at this link :
However, the same issue will then happen for the newly created OpenMRS user. Since your version worked I assume you initially configured it with the “standard” authentication?
I believe we need to upgrade the connector. Using the latest allowed both authentication schemes.
In the the root POM I tried it with 8.0.16 :
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.16</version> <scope>runtime</scope> </dependency>
However, the 8.x.x series requires Java 8. If we are still supporting 7 I think upgrading to 5.1.47 will also do the trick.
I see there is another connector for mxj there but I am not sure what it is used for or how to test it.
@spaffrath we are currently supporting java 8 not 7, that is for the later versions.
Most of that work was done in this ticket TRUNK-5497
And now only testing that the core suppoerts Mysql 8 is what is remaining. Actualy a few results from the testing are postive , @spaffrath can you clone the already work done in that ticket above confirm this works ??
Yes I’ll do that. I misunderstood initially and am finding my way around the work flow.
I confirmed that the set up works using both authentication schemes. I also read through the release notes for the Connector to see if anything looked like it would need attention and it looked fine.
I had some issues in the deploy that are particular to me so I think it’s best to get a veteran developer who knows the interfaces to ensure adequate coverage. I will need to start a bit smaller
Thanks for looking into this! Does the same code run with MySQL 5.7?
On 5.7 I am getting the same error during set-up as the author has mentioned here :
Picked up this task and noticed that some attempt at solving it had been made.
Made the necessary changes to the dependencies that already resolves some of the issues encountered initially by @spaffrath on “caching_SHA2_password” which is handled by upgrading the dependencies to 8.0.x for mysql-connector and 5.0.12 for mysql-connector-mxj. Also replaced the deprecated calls to how we load the drivers from com.mysql.* package to com.mysql.cj.* package to eliminate the warning “Loading class
com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.”
Testing the core functionality using the legacy framework as detailed by @reagan in this comment seems to work fine after building and running the platform with the changes and against both MySQL 7 & 8 with the legacy UI module installed.
However adding the reference application addons (2.9.0) to the running instance causes the setup to revert to the initial setup page with failure messages.
Is there an SOP on the way to fully test this that you would recommend?
For now, if you want to test with the reference application addons (2.9.0), then use the 2.3.x branch instead of master.
Noted, was using the master.
@stans for the master branch, can you download and use these addons? https://ci.openmrs.org/browse/REFAPP-OMODDISTRO-9897/artifact