Connection con = null;
String driver = "com.mysql.jdbc.Driver";
try {
Class.forName(driver).newInstance();
} catch (Exception e) {
System.out.println("Failed to load mySQL driver.");
return null;
}
try {
con = DriverManager
.getConnection("jdbc:mysql:///AJAX?user=ajax&password=aardvark");
} catch (Exception e) {
e.printStackTrace();
}
return con;