hcarousel
08-01-2006, 02:37 PM
What I want to do is to connect to an MySQL database on a remote server. The following is my code.
Connection con;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://remoteserver:3306/mydatabase", "root", "password");
I got com.mysql.jdbc.CommunicationsException. Can somebody please tell me how to correct this error?
Thanks!
Connection con;
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://remoteserver:3306/mydatabase", "root", "password");
I got com.mysql.jdbc.CommunicationsException. Can somebody please tell me how to correct this error?
Thanks!