com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 1 ms ago. in eclipse -
i did jdbc connectivity lastnight not working today..although have'nt changed code or else. please me out. code is:
package programs; import java.sql.*; class dbase { public static void main(string args[]) { try { class.forname("com.mysql.jdbc.driver"); connection c=drivermanager.getconnection("jdbc:mysql://localhost:3306/scms","root","scms"); if(c!=null) system.out.println("connection o.k."); else system.out.println("connection failed!"); } catch(exception e) { system.out.println(e); } } }
Comments
Post a Comment