Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- com.mysql.jdbc.exceptions.jdbc4.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.
- String url = "jdbc:mysql://" + "mysql2.000webhost.com/";
- try
- {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- Connection conn = DriverManager.getConnection(url + "DB_NAME", userName, passWord);
- }
- catch (InstantiationException | IllegalAccessException | SQLException e)
- {
- System.out.println(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement