1

Created a user testdb1. Issued:

postgres=# alter user testdb1 with password 'testdb1';
ALTER ROLE
postgres=# 

Then added an entry to pg_hba.conf:

local    all             testdb1         password (also tried md5)

but when I try to connect:

psql -U testdb1 -W
Password for user testdb1: (type in password here)
psql: FATAL:  Peer authentication failed for user "testdb1"

What am I still missing?

1 Answer 1

1

The line I added:

local    all             testdb1         md5

need to be BEFORE the pre-existing line:

local   all             all               peer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .