I would like to be able to connect to the MySQL server using JDBC over an SSL connection. The MySQL documentation states that we must set the system properties:
java System.setProperty("javax.net.ssl.trustStore","path_to_truststore_file"); System.setProperty("javax.net.ssl.trustStorePassword","password");
Really, it works ... for MySQL. But once I set these system properties, I canโt make regular HTTPS calls to registered websites. System trust was overridden and I received an SSLHandshakeException
.
I would like to be able to install trusted ONLY for MySQL JDBC connectivity. Any regular HTTPS call must use the system trust store.
How can I do that?
I found this question that may lead to an answer, but it does not seem to work.
source share