user1541125
user1541125

Reputation: 41

psql: FATAL: Peer authentication failed for user "blah"

On CentOS, I am trying to use rake to migrate data from sqlite3 to postgresql.

When I try to connect to PostgreSQL using the command line:

psql -d <db> -U <user> -W

I get:

psql: FATAL:  Peer authentication failed for user "blah"

For testing I even set method to trust for psql. Here are the contents of my pg_hba.conf:

local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust

Any ideas what might be wrong?

Thanks

Upvotes: 4

Views: 9295

Answers (1)

Chris Travers
Chris Travers

Reputation: 26454

Restart PostgreSQL and if that fails post the full pg_hba.conf for us to look at.

Either PostgreSQL has not reloaded this file or you are looking at the wrong pg_hba.conf.

Upvotes: 3

Related Questions