Skip to content

Instantly share code, notes, and snippets.

@laszlomiklosik
Last active May 24, 2022 09:22
Show Gist options
  • Save laszlomiklosik/9661756 to your computer and use it in GitHub Desktop.
Save laszlomiklosik/9661756 to your computer and use it in GitHub Desktop.
Allow remote access to postgres via username and password
1) in file /var/lib/pgsql/9.3/data/postgresql.conf change the default value 'localhost' to '*' (all) as shown
listen_addresses = '*'
2) in file /var/lib/pgsql/9.3/data/pg_hba.conf add line:
host all all all password
3) if it still does not work, you bet it's iptables fault. so either stop it temporarily to verify this or add an exception for port 5432
see this: http://www.cyberciti.biz/tips/howto-iptables-postgresql-open-port.html
@asta-kun
Copy link

asta-kun commented Jun 8, 2019

Thanks 7u7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment