Every time I connect to the Database or try to execute a query, I get the following error in console:
Sat Sep 10 17:38:48 BOT 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
The following is my class to connect and at the same time disconnect to MySQL :
package comm.estudiante.dao.mysql;
import comm.estudiante.dao.mysql.interfaces.DBConnection;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class MySQLDBConnection implements DBConnection {
String host = "localhost";
String port = "3306";
String db = "itla";
String table = "notas";
String user = "root";
String pass = "itla";
String url = "jdbc:mysql://" + host + ":" + port + "/" + db + "?user="
+ user + "&password=" + pass;
Connection con;
Statement stmnt;
ResultSet rs;
public Connection conectar() throws SQLException {
return DriverManager.getConnection(url);
}
@Override
public void desconectar(Connection con) {
if (con != null) {
try {
con.close();
} catch (SQLException ex) {
}
}
}
The problem is that it is SSL but I do not know how to solve it.