posted 13 years ago
Hi,
I am connecting to My SQL database using the below code. But am getting an exception below.
Class.forName("com.mysql.jdbc.Driver");//works fine
System.out.println("My SQL driver loaded: ");
Connection conn = DriverManager.getConnection ("jdbc:mysql://10.1.5.23:3306/mysql", "root", "root");
System.out.println("Connected to My SQL database........ ");
Exception is >>>>>>>>
com.mysql.jdbc.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
Please help.
Thanks,
Mats.