4

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

2
  • 1
    1) Do you connect from the local machine, or from remote? 2) What are the -d -U -W flags suppsed to do ? 3) What is in the logfile ? Commented Jul 20, 2012 at 15:42
  • Also, did you reload / restart PostgreSQL after changing the authentication config file? Commented Jul 21, 2012 at 14:08

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.