Hi guys,
I’m tearing my hair out!
I’ve done a tonne of research on connecting to this postgres instance, which is housed on a droplet (even just a basic connection).
So far I’ve: -Changed the postgres port on the Droplet to 5433 (I already have a local postgres server so wanted to avoid clashes?) -updated the pg_hba.conf file with
host all all (My public IP)/32 md5
listen_addresses = '*'
changed the postgres password to 1234 for my ‘postgres’ user (otherwise it would have no p/w)
restarted postgresql on the droplet.
Now I’m trying to set up a server on PgAdmin4 and using the Droplet IP as the Host Name, port 5433, username postgres and password 1234. No role or service.
Result is: ‘Unable to connect to server: timeout expired’
I’ve tried changing pg_hba to ‘trust’ instead, and to allowing all IPs (0.0.0.0/0), but I’m just not getting anything back from the droplet at all.
Any ideas?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @simondavidmusic01,
What I could suggest is to run the following command to check if your PostgreSQL service is listening on 0.0.0.0:
netstat -plant
Another thing that I could suggest is to use an SSH tunnel with your SQL client rather than allowing direct access to the database for the whole world.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.