code: static Connection connect(String username, String password, String database, String driverName) throws ClassNotFoundException, SQLException {
          String url = "jdbc:mysql://localhost:3306/" + database + "?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false";
          String driver = (Objects.isNull(driverName) || driverName.isEmpty()) ? "com.mysql.cj.jdbc.Driver" : driverName;
          return doConnect(driver, url, username, password);
      }
docs: This is a utility function for connecting to a
  database instance that's running on localhost at port 3306.
  It will build a JDBC URL from the given parameters and use that to
  obtain a connect from doConnect()
  @param username database username
  @param password database password
  @param database database name
  @param driverName the user supplied mysql connector driver class name. Can be empty
  @return Connection
  @throws ClassNotFoundException exception
  @throws SQLException exception