cannot connect to MySQL server over the internet

hi,

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?

[972 byte] By [dfvdfvdfvxfva] at [2007-11-26 17:50:56]
# 1
this is the error message I get:null, message from server: "Host 'd54C151EE.access.telenet.be' is not allowed to connect to this MySQL server"but I don't get it?I provide the server with the right login credentials
dfvdfvdfvxfva at 2007-7-9 5:03:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
OK it works now!just needed to edit mysl rights to get remote access (from every host) like:GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword';grtz
dfvdfvdfvxfva at 2007-7-9 5:03:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...