By Conscript
I have installed Unbuntu on a droplet as well as a PostGresql server setup on it as well.
I was however, able to connect in the terminal on my droplet with this: psql -h [ip_address] -d [name_of_the_database] -U [username]…
I am unable to remotely connect to my Postgresql database(s) via pgAdmin4 or Azure Data Studio. I have been researching for the past week on what the issue is and still have not had any luck…
I have changed the required config files as suggested in many other topics exactly like mine.
I have a db user that has been granted all privileges to the database I want to dev on.
I have changed my pg_hba.conf file so that it accepts all IPs’ both for IPV4 and IPV6. For Example: 0.0.0.0/0 and ::/0
I have changed the postgresql.conf so that the listening addresses = ‘*’ (yes, its uncommented).
I have also ran the script for the firewall for port 5432.
When I try to connect to the database using Azure data studios I keep getting:
“Is the server running on host”..." and accepting TCP/IP connections on port 5432?"
or when I try to connect in pgAdmin4 it just says I am unable to connect
Thus, when I run netstat -nlt I can see that can’t be rue becasue of this:
tcp 0 0 0.0.0.0:5432 0.0.0.0: LISTEN*
Any ideas on whats going on here…?
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!
This sounds like your firewall is blocking the connections. If you run sudo ufw status do you see a rule allowing access on port 5432?
If not, make sure to allow it with the following:
ufw allow 5432/tcp
Also did you restart your PostgreSQL service after making those changes?
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.