cannot connect to MySQL server over the internet
843859Feb 8 2007 — edited Feb 8 2007hi,
i can connect to the MySQL server on another machine in my lan perfectly in the same network.
but when i try to connect via the internet it won't connect :(
this is the code that i use (that works perfectly when i use the local ip)
String userName = "me"
String password = "something";
String url = "jdbc:mysql://xx.xx.xx.xx:3306/fileserver";
Class.forName ("com.mysql.jdbc.Driver").newInstance ();
conn = DriverManager.getConnection (url, userName, password);
System.out.println ("Database connection established");
port 3306 is forwarded in the router to the right pc because when I try:
telnet xx.xx.xx.xx 3306 i get the following message:
Trying xx.xx.xx.xx...
Connected to xx.xx.xx.xx.
Escape character is '^]'.
Host 'something.access.telenet.be' is not allowed to connect to this MySQL serverConnection closed by foreign host.
what could be the problem??