Re: Connecting to mySQL database over the LAN I am sorry for all the trouble of not putting up my Question properly
the error i get is :
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
when I run the code:
import java.sql.*;
import java.lang.*;
public class testingJDBC {
/** Creates a new instance of testingJDBC */
public testingJDBC() {
}
public static void main(String argsp[]){
try{
Statement stmt;
Class.forName("com.mysql.jdbc.Driver").newInstance ();
String url ="jdbc:mysql://147.25.238.215:3306/test";
Connection con =DriverManager.getConnection(url,"root",
"000000");
stmt = con.createStatement();
stmt.executeUpdate("CREATE DATABASE JunkDB");
}
catch(Exception e){
System.err.println("connection cann't be established
\n"+e);
}
}
}
Please help me out I am stuck at this point.
Thanking you in advance,
Mithil |