Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Class.forName("com.mysql.jdbc.Driver");
- java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://11.222.33.444:3306/mybase?user=user&password=pass");
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- return;
- } catch (SQLException e) {
- e.printStackTrace();
- return;
- }
- com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
- at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:172)
- at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
Add Comment
Please, Sign In to add comment