1 of 1 people found this helpful
The MySQL 5.7 Reference Manual as well as the MySQL Connector/J 5.1 Developer Guide provide the details.
Chap 7.4 (Using Secure Connections) of the ref manual and chap 5.5(Connecting Securely Using SSL) of the connector guide explain the steps
But you should
- make sure that MySql is build with support for secure connections (OpenSSL or yaSSL)
- make sure that ssl is enabled (-ssl option in MySql)
- the certificates are generated (mysql_ssl_rsa_setup)
- import the MySQL server CA Certificate into a Java truststore or create a truststore in the current directory, and import the server's CA certificate
- either import the client certificate that matches the CA certificate you just imported, or create a new client certificate.
- set the system properties.
For setting up the datasource in WildFly you may set the properties in the connection url like:
Thanks for the help. The above implementation worked for me and saved a lot of time.