public String getUrl(String dbName) {
    if (type.equalsIgnoreCase("mysql")) {
      return String.format("jdbc:mysql://%s:%s/%s?useUnicode=true&characterEncoding=utf8", ip, port, dbName);
    } else {
      return "";
    }    
  }