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!
# 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.
# 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.