code: public String getHost() {
          String hostAndPort = hostAndPort();
          int indexOfMaohao = hostAndPort.indexOf(":");
          if (indexOfMaohao == -1) {
              return hostAndPort;
          } else {
              return hostAndPort.substring(0, indexOfMaohao);
          }
      }
docs: parse database url and get the host.
  
  @return the database host