Postgres - nimrody/knowledgebase GitHub Wiki
Internals
Using
-
Show config file location
SHOW config_file;
-
pg_hba.conf
for password authentication (local entries are for unix sockets, host are for tcp access). You need to access the database usingpsql -h127.0.0.1 -Uuser --password
local all postgres peer
local all all peer
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local all all md5 -
Command line password:
PGPASSWORD=xxxx psql -U username databasename
orpsql postgresql://user:password@host/dbname