Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
  2.  
  3. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  4.  
  5. String url = "jdbc:mysql://" + "mysql2.000webhost.com/";
  6. try
  7. {
  8. Class.forName("com.mysql.jdbc.Driver").newInstance();
  9. Connection conn = DriverManager.getConnection(url + "DB_NAME", userName, passWord);
  10. }
  11. catch (InstantiationException | IllegalAccessException | SQLException e)
  12. {
  13. System.out.println(e);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement