code: public void setConnection(
          String DbDriver,
          String DbConStr,
          String DbConStrParams,
          String DbUser,
          String DbPwd,
          boolean logErrors) {
  
          String jdbcUrl = DbConStr;
          try {
              if (DbConStrParams != null) {
                  jdbcUrl += DbConStrParams;
              }
              if (CmsStringUtil.isEmptyOrWhitespaceOnly(DbPwd)) {
                  DbPwd = null;
              }
              Class.forName(DbDriver).newInstance();
              m_con = DriverManager.getConnection(jdbcUrl, DbUser, DbPwd);
              LOG.info("OpenCms setup connection established: " + m_con);
              LOG.info(" [autocommit: " + m_con.getAutoCommit() + "]");
          } catch (ClassNotFoundException e) {
              System.out.println("Class not found exception: " + e);
              m_errors.add(Messages.get().getBundle().key(Messages.ERR_LOAD_JDBC_DRIVER_1, DbDriver));
              m_errors.add(CmsException.getStackTraceAsString(e));
          } catch (Exception e) {
              if (logErrors) {
                  System.out.println("Exception: " + CmsException.getStackTraceAsString(e));
              }
              m_errors.add(Messages.get().getBundle().key(Messages.ERR_DB_CONNECT_1, DbConStr));
              m_errors.add(CmsException.getStackTraceAsString(e));
          }
      }
docs: Creates a new internal connection to the database.<p>
  
  @param DbDriver JDBC driver class name
  @param DbConStr JDBC connect URL
  @param DbConStrParams JDBC connect URL params, or null
  @param DbUser JDBC database user
  @param DbPwd JDBC database password
  @param logErrors if set to 'true', errors are written to the log file