How do I connect from Java to a MySQL database? The Java is running on a local machine while the Database is on a remote server.
JDBC, of course. Get the mysql connector-j jar, put it in your classpath, and read the docs.