@Override
	public boolean open(String hostname, String port, String database,
			String username, String password) {
		// load driver if necessary
		loadDriver();

		// if the driver failed to load we need to cancel
		if (!driverLoaded)
			return false;

		try {
			String jdbcpath = "jdbc:mysql://" + hostname + ":" + port + "/"
					+ database;

			conn = DriverManager.getConnection(jdbcpath, username, password);

			return true;
		} catch (SQLException e) {
			// handle any errors
			console.printf("SQLException: %s\n", e.getMessage());
			console.printf("SQLState: %s\n", e.getSQLState());
			console.printf("SQLVendorError: %s\n", e.getErrorCode());

			return false;
		}
	}