configuring pg admin

  • Posted July 2, 2013

I have a script (which I copied from a tutorial at linode that’s supposed to tunnel from my local machine to postgres on my VPS, however, I’m unable to gain access to the database.

I’m not sure if, in the following image,

a) ‘name’ has to be the exact name (case-sensitive) of my droplet b) ‘host’ is my ip address on Digital Ocean, or something else c) if ‘port’ should be 5433 as in the image below, or if I should set it to ‘80’ or something else. Where should I get the port number from

Thanks if you can help


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.

Hi, I would like to connect to the database that I use on my Rails app on Digital Ocean (deployed via dokku) but I can’t… <br> <br>When I do a dokku config app_name, here is what I get: <br>postgres://root:[PART2]@[PART3]/[DATABASE NAME] <br> <br>And here is the info that I provide in pgadminIII: <br>name: droplet name <br>host: value of PART3 (it’s an IP with no port number specified) <br>port: 5432 (default) <br>username root <br>password: value of PART2 <br> <br>Thanks in advance for your help

Make sure the user you’re connecting as has proper permissions to read the production database and its tables.

As I said, I can’t see the data I’d expect to see, so I wasn’t sure if the tunnel was connected properly, but if the information provided confirms for you that the tunnel’s set up, then it’s ok i guess. Thanks

The fact that you’ve been able to connect means the tunnel was successfully set up. <br>Everything seems to be working - is there anything else we can help you with?

Hi, I did run “./ start” and it asked me for my password for the server, which I entered and the terminal just returned to normal. there was no confirmation that I was connected. I opened PG Admin3 and clicked on the local PGSQL5432, and, within that, I clicked on the name of the production database. That’s where I thought something wasn’t working right, because I couldn’t see any of the data that I would have expected to see if I was looking in my production database.

Did you run “./ start”? <br> <br>Name can be anything you want <br>Host should be <br>Port should be 5433 <br> <br>What you’re doing is basically mapping port 5433 on your local machine to port 5432 on the server, therefore you have to connect to localhost:5433.