Database URL formation (server IP address, port number, database name).
Download MySQL jar to be included in the project classpath.
The data source has several advantages over a driver manager: it supports distributed transactions. Shell> openssl x509 -req -in server-req.pem -days 1000 \ There are two basic ways of creating a connection to a database in Java: a) with a driver manager, b) using a data source. nodes -keyout server-key.pem > server-req.pem Shell> openssl req -newkey rsa:2048 -days 1000 \ All we will need to do is put the JAR file in the directory contained in CLASSPATH. It is written in pure Java, which means we will not need any native libraries or ODBC bridge. Shell> openssl req -new -x509 -nodes -days 1000 \ For the MySQL database, we will use the Type 4 JDBC driver from the mysql-connector-java-5.1.23-bin.jar package. Listed below are some example JDBC URL formats. The next step in creating the connection is to construct the JDBC URL.
I've got self-created certificates as described in MySQL manual, in Using SSL for Secure Connections, specifically: # Create CA certificate MySQL Connector/J Java Class: For newer MySQL drivers: .jdbc.Driver. How one can make MySQL JDBC work over SSL (with X509 certificates validation)?