I am making database connection remotely but i am getting "communication link failure" my code is:
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://49.58.100.100:3306/abc", "abc1","abc");
System.out.println(con);
I am making database connection remotely but i am getting "communication link failure" my code is:
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://49.58.100.100:3306/abc", "abc1","abc");
System.out.println(con);
 
    
    Try to execute in the cmd :
telnet  49.58.100.100 3306
If you get timeout means the server is not reachable, to solve this you need to open the firewall port in your server.
