【问题标题】:Unable to connect to greenplum postgresql from pgadmin on windows无法从 Windows 上的 pgadmin 连接到 greenplum postgresql
【发布时间】:2016-12-06 21:37:03
【问题描述】:

我的 Window 系统上有 PGADMIN 3。我无法连接到 Virtualbox-Centos 机器下的 Greenplum-Postgresql。在 Virtualbox 中,我可以使用 psql 创建数据库,但不能使用 windows 机器上的 pgadmin。

请建议我现在应该做什么。

【问题讨论】:

    标签: postgresql greenplum


    【解决方案1】:

    您也可能没有 gpadmin 数据库。从这个开始:

    psql template1 -c "select * from pg_database where datname = 'gpadmin'"
    

    如果数据库不存在,请执行以下操作:

    psql template1 -c "create database gpadmin"
    

    接下来,执行此操作以允许使用加密密码进行身份验证的外部连接:

    echo "host all all 0.0.0.0/0 md5" >> $MASTER_DATA_DIRECTORY/pg_hba.conf
    psql -c "alter user gpadmin password 'password'"
    gpstop -u 
    

    返回 pgAdmin,以用户 gpadmin、密码“password”和端口 5432 连接到您的虚拟机(使用 ifconfig 获取 IP 地址)。

    【讨论】:

      【解决方案2】:

      GPDB/Postgresql 默认拒绝远程访问。您需要将 ACL 添加到 $MASTER_DATA_DIRECTORY 中的 pg_hba.conf,即 /data/master/gpseg-1/pg_hba.conf。 参考 https://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html 或者 http://gpdb.docs.pivotal.io/43100/admin_guide/client_auth.html 了解详情

      【讨论】:

        【解决方案3】:

        如果您粘贴确切的错误会很好。

        • 确保您已在 postgresql.conf 中的 listen_address 添加 IP(需要重新启动)
        • 确保iptablesip6tables 没有运行。运行以下命令进行检查

          • service iptables status
          • service ip6tables status

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2021-09-17
          • 1970-01-01
          • 1970-01-01
          • 2023-04-08
          • 1970-01-01
          • 2013-07-20
          • 1970-01-01
          相关资源
          最近更新 更多