Ronak
Ronak

Reputation: 389

Unable to connect to greenplum postgresql from pgadmin on windows

I have PGADMIN 3 on my Window system. I am not able to connect to Greenplum-Postgresql which is under Virtualbox-Centos machine. Inside Virtualbox I am able to createdb using psql, but not using pgadmin from windows machine.

Please suggest what should I do now.

Upvotes: 1

Views: 1763

Answers (3)

Jon Roberts
Jon Roberts

Reputation: 2106

You might not have the gpadmin database either. Start with this:

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

If the database doesn't exist, do this:

psql template1 -c "create database gpadmin"

Next, execute this to allow external connections that are authenticated with encrypted password:

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 

Back to pgAdmin, connect to your vm (use ifconfig to get the ip address) as user gpadmin, password 'password', and port 5432.

Upvotes: 3

pgyogesh
pgyogesh

Reputation: 352

It would be good if you paste exact error.

  • Make sure you have added IP in listen_address in postgresql.conf (Requires restart)
  • Make sure iptables and ip6tables are not running. Run below commands to check

    • service iptables status
    • service ip6tables status

Upvotes: 0

Sung Yu-wei
Sung Yu-wei

Reputation: 161

GPDB/Postgresql deny remote access in default. You will need to add ACL to pg_hba.conf in $MASTER_DATA_DIRECTORY, ie, /data/master/gpseg-1/pg_hba.conf. refer to https://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html or http://gpdb.docs.pivotal.io/43100/admin_guide/client_auth.html for details

Upvotes: 1

Related Questions