<%@page import="java.sql.*" %> <% /* change the following three String values... */ String username = "your username"; String password = "your MySQL password"; String q = "SELECT * FROM SomeTable;"; /* you shouldn't have to edit this */ String url = "jdbc:mysql://dbserver.cs.uchicago.edu/" + username; Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection(url, username, password); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(q); %> <% /* close the ResultSet etc. when the page doesn't require them any more */ rs.close(); stmt.close(); con.close(); %>