470,636 Members | 1,601 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

remote connection

Hi,

I'm getting the following exception and I'm not really sure why I'm
getting it.
***Exception: Unable to connect to any hosts due to exception:
java.net.ConnectException: Connection timed out: connect**** The
default mysql port 3306 has been opened by our network administator
and clotho is the firewall behind which our server resides. the
following is my java-mysql code.

*****
public static Connection connect(){

try{

String url =
"jdbc:mysql://clotho.socsci.umn.edu:3306/test";
// String url ="jdbc:mysql:///stat_ddippss";
con = DriverManager.getConnection(url, "user", "test");
}
catch(Exception e){
System.err.println("Exception: " + e.getMessage());
}
return con;
}
public static void loadDriver(){
try{
Class.forName("com.mysql.jdbc.Driver");
}
catch (Exception e){

}
}
**************
Thanks!!
Gena
Jul 19 '05 #1
0 2177

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Mitya Mitriev | last post: by
1 post views Thread by Chris | last post: by
4 posts views Thread by chris | last post: by
1 post views Thread by Korara | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.