Question

connect to droplet running postgresql 9.3 with pgadmin3

  • Posted May 13, 2014

Hey Folks. I am running ubuntu 14.04 x64 on my own computer, and I am trying to access a droplet that is running 1404 x64 with postgresql 9.3. So I want to connect to the droplet postgresql instance using pgadmin3. I was not sure how to do this though? Are there any particular permissions or services I have to set on the droplet to remotely connect with pgadmin?

Subscribe
Share

I am wanting to the do same thing however i’m having great difficulty with SSH tunnelling and using my keys. I keep getting Error Code 61 when I try to create my connection. I also can’t find any examples anywhere for this.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@dangelo: Have you set up a firewall? Make sure port 5432 on the server is actually open. On the server, you can run “netstat -plunt” to see a list of which ports are open with something actively listening for connections.

You could use something like: <br> <br><pre> <br>host all all 0.0.0.0/0 md5 <br></pre> <br> <br>to enable connections from all IPs provided you have the password. Though it’s generally considered better practice to restrict access to certain IP ranges. You can provide multiple different ranges if you move between different trusted networks. Check out the documentation here: <br> <br>http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html

First you need to make sure postgres is accessible remotely. Edit the file "/etc/postgresql/9.3/main/postgresql.conf " and change the "listen line from: <br> <br><pre> <br>#listen_addresses = ‘localhost’ <br></pre> <br> <br>to <br> <br><pre> <br>listen_addresses = ‘*’ <br></pre> <br> <br>Then restart postgres with: “service postgresql restart” <br> <br>Now you should be ready to connect using pgadmin3. Take a look at the documentation here: <br> <br>http://www.pgadmin.org/docs/1.18/connect.html <br> <br>In the host field, use the IP address of your droplet. By default, postgres listens on port 5432. The username and password should be for the database user. <br> <br>For some more basic postgres help, check out: <br> <br>https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-14-04 <br> <br>Let us know how it goes!

First you need to make sure postgres is accessible remotely. Edit the file "/etc/postgresql/9.3/main/postgresql.conf " and change the "listen line from: <br> <br><pre> <br>#listen_addresses = ‘localhost’ <br></pre> <br> <br>to <br> <br><pre> <br>listen_addresses = ‘*’ <br></pre> <br> <br>Then restart postgres with: “service postgresql restart” <br> <br>Now you should be ready to connect using pgadmin3. Take a look at the documentation here: <br> <br>http://www.pgadmin.org/docs/1.18/connect.html <br> <br>In the host field, use the IP address of your droplet. By default, postgres listens on port 5432. The username and password should be for the database user. <br> <br>For some more basic postgres help, check out: <br> <br>https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-14-04 <br> <br>Let us know how it goes!

He modificado ambos archivos pero sigue rechazando la conexion por la configuracion en el archivo pg_hba.conf.

Alguna otra sugerencia?

This comment has been deleted

I am getting the same error message. There wouldn’t be a firewall set up on the server by default, would there be?

@dangelo.cm: Are you getting the same error message when you change the port or something different?

Even if I use that, I’m still not having success. Do I need to be using SSH tunnelling? <br> <br>I’m using: <br>Host: My droplet IP <br>Port: 855 <br>Maintenance DB: postgres <br>Username: postgres <br>Password: <my password> <br> <br>Am I missing something? Thanks again for the help.

@dangelo: It looks like you are actually using port 855 for postgres. So make sure you use that in the pgAdmin III connection dialog.