If you have a mysql database on a web server, then a java client can connect to it using jdbc with no java required on the server. That is, the JDBC driver is on the client not the server side.
To get yourself started, download JDBC MySQL connector from
www.mysql.com, and play with client code like:
String host,database,username,password;
String url = "jdbc:mysql://"+host+"/"+database+"?user="+username+"&?password="+password;
Class.forName("com.mysql.jdbc.Driver");
Connection con =DriverManager.getConnection(url);
.
.
.