views:

162

answers:

2
A: 

This might be a firewall issue, it could be blocking incoming connections on the MySQL port (by default, 3306). To see if that's the case, you could try telnetting into the MySQL server and port and seeing if you're denied access.

Here's a Sun forums post which discusses this error.

Kaleb Brasee
Thanks,KalebI forget to mention that I am using Windows.My connector/J is 5.1.10 and I am using JDK 1.6. (I think there is no problems with them)Also, my firewall is turned off.But I still got the same error.
+1  A: 

So locally it works fine, but at college not? Then it's a matter of a firewall at the college. Contact the network admin of the college for support.

BalusC
Just for an update this issue, the previous question is based on the network at my home. I had tried to connect mySQL by using network in my college and the result is successfully retrieved.