using stand alone JAVA app connected to a Internet MYSQL server

I plan to develop a JAVA app which has to connect to a Internet MYSQL server to obtain the data it needs to process. The app is designed to be a Desktop Application running on a system with a Internet Connection.

Someone told me that in order to do this I need to install the Java app on the same server with the MySQL server. Is this true? Can't I just connect to it?

Thank you!

[399 byte] By [nopceafrancisca] at [2007-11-27 3:40:25]
# 1
No you don't have to. If the server allows connections from outside (considering firewalls and user right, etc, etc, then you can simply connect to it). I would, however, suggest using SSL and make the remark that opening a Database port to the world, is not an especially good idea.
masijade.a at 2007-7-12 8:43:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
This is actually not true. If the MySQL server host + port is just accessible by Internet, then you can access it from anywhere. You may get into problems if you're restricted by firewall or login rules or so, but this is not per-se a Java-specific issue.
BalusCa at 2007-7-12 8:43:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
OK. Is it possible or not?
nopceafrancisca at 2007-7-12 8:43:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
If you don't understand our answers (which are almost identical, but phrased another way), please elaborate which part you don't understand.
BalusCa at 2007-7-12 8:43:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
Ok. I get it now. I thought that that the second answer was denying the first, instead of just answering the first! Sorry for this, and thank you again for your answer.
nopceafrancisca at 2007-7-12 8:43:51 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...