1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Connecting to MySQL databases via a Java applet
One solution is to have a Perl or PHP script which runs on the server and which makes SQL requests on the web server. Your Java applet then simply needs to make posts to this CGI or PGP script, which will then operate as a wrapper around your database.
Link to this FAQ: