Database Java Tutorial

public static final String DATABASE_USER = "user";
    public static final String DATABASE_PASSWORD = "password";
    public static final String MYSQL_AUTO_RECONNECT = "autoReconnect";
    public static final String MYSQL_MAX_RECONNECTS = "maxReconnects";
    public static Connection getConnection() throws Exception {
         String driver = "org.gjt.mm.mysql.Driver";
         Class.forName(driver);
         String dbURL = "jdbc:mysql://localhost/tiger";
         String dbUsername = "root";
         String dbPassword = "root";
         java.util.Properties connProperties = new java.util.Properties();
         connProperties.put(DATABASE_USER, dbUsername);
         connProperties.put(DATABASE_PASSWORD, dbPassword);
         connProperties.put(MYSQL_AUTO_RECONNECT, "true");
         connProperties.put(MYSQL_MAX_RECONNECTS, "4");
         return DriverManager.getConnection(dbURL, connProperties);
    }