Remote access to a PostgreSQL Database (DigitalOcean)

Remote access to a PostgreSQL Database (DigitalOcean)



Step by Step on how to remote into a PostgreSQL database.

Software used:
PgAdmin 4
PostgreSQL 9.5
DigitalOcean

List of commands used:

sudo apt update
apt install postgresql postgresql-contrib
update-rc.d postgresql enable
service postgresql startcd ../etc/postgresql/9.5/main
edit pg_hba.conf: all all (YOUR IP ADDRESS)/32 trust
edit postgresql.conf: listen_addresses = ‘*’

service postgresql restart

25 thoughts on “Remote access to a PostgreSQL Database (DigitalOcean)

  1. Hi! What is that [email protected] ? I guess it is not the same account on a remote server that was configured to work over ssh on another video? I've logged on the server on DigitalOcean but there is no postgresql folder in etc folder and no such conf files. So is [email protected] on some other server?

  2. I keep getting Unable to connect to server:
    could not connect to server: Connection refused
    Is the server running on host "###" and accepting
    TCP/IP connections on port ###- Where am I going wrong?

  3. Hola Juan,
    Me aparece el típico mensaje de "TCP/IP connections on port 5432?" y lo tengo todo hecho tal cuál tú… sabrías decirme por qué es?
    Gracias!

  4. edit pg_hba.conf: all all (YOUR IP ADDRESS)/32 trust –when you say YOUR IP ADDRESS is that the IP Adddress of the DO server or your personal computer?

Leave a Reply

Your email address will not be published. Required fields are marked *