Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://www.postgresql.org/docs/9.3/libpq-pgpass.html

nano ~/.pgpass && chmod 600 ~/.pgpass
#hostname:port:database:username:password

Test:

psql -h host -U uname -d dbname -p port

Specify pgpass file:

PGPASSFILE=~/.pgpass psql -h 127.0.0.1 -U openproject -d openproject -p 45432


Note:

Hostname localhost must be same in pgpass, it will not resolve 127.0.0.1 = localhost.

  • No labels