Caused by: javax.net.ssl.SSLHandshakeException:
Remote host terminated the handshake.
One step forward, one step back.
You have a valid jdbc:mysql:… connection string, it’s using the
lib/mysql-connector-java-8.0.30.jar to establish a network connection to your mysql server.
So all is fine as far as Java/CS-Studio/Phoebus/your
jdbc:mysql:… connection string are concerned.
But then the mysql-connector client lib fails to agree with your MySQL server on some SSL handshake detail.
So now it’s a MySQL problem, where I really have no immediate solution, but the good news is that there’s a large world-wide MySQL user base out way beyond EPICS/CS-Studio where you can look for
help.
Now we’ve seen similar issues before, in that case a new mysql-connector client library required “CLIENT_PLUGIN_AUTH” which was not supported by older MySQL
servers (5.1.73), see
https://github.com/ControlSystemStudio/phoebus/issues/1409
Eventually we updated to mysql-connector-java-8.0.30.jar which is relatively new (~1 year old, since March there’s 8.0.33). Your MySQL server version 5.7.12
is way old (2016), so maybe they are simply incompatible.
Things you can try: Look at the MySQL server side. Maybe there’s a way to disable SSL, which may not be desirable for a production setup, but gets you going for initial tests.
Since right now your client (ca. 2022) is much newer than the server (ca. 2016), use a newer MySQL or MariaDB version.
Or change to an older client side. You can fetch them from
https://search.maven.org/artifact/mysql/mysql-connector-java . But
note that simply replacing the file lib/mysql-connector-java-8.0.30.jar with for example an older lib/mysql-connector-java-5.1.45.jar doesn’t work. It’s not sufficient to simply place a *.jar file in the lib folder, the exact name
also needs to be listed in the META-INF/MANUFEST.MF file that’s inside the product.jar, which you can’t conveniently edit. To test other mysql-connector jar file versions, it’s thus much easier to keep the currently used name. Just copy them into the lib folder
by using the name mysql-connector-java-8.0.30.jar. For example, get a mysql-connector-java-5.1.45.jar, rename it to mysql-connector-java-8.0.30.jar and then copy that into the lib folder, replacing the one that’s there.
-Kay