Skip to main content

Postgres - Useful Commands

Create a file to store login and password

cd /root
vi .pgpass
localhost:5432:*:postgres:password1
localhost:5433:*:postgres:password1
psql -h localhost -p 5432 -U postgres -c '\conninfo'