Hi all,
I am using following code, but evry time i try to use it, I get the error " Communications link failure". Can anybody help??
Connection con = null; Statement stmt = null; ResultSet rs = null; try { Class.forName("com.mysql.jdbc.Driver"); log.info("Creating connection with the database"); ///////it doesn't go to the next log statement///////// con =DriverManager.getConnection ("jdbc:mysql://192.168.1.10:3306/project2","", ""); log.info("connection made"); stmt = con.createStatement(); //rs = stmt.executeQuery("insert into CallEvent values('1','2','3','4','5','6','7','8')"); } catch(Exception e) { log.error(e); }
|