Ident authentication failed for user - Mailing list pgsql-general

From Ruben Blanco
Subject Ident authentication failed for user
Date
Msg-id CAP4Xq2F3=7emtdsOTyvwMEx3=5Nizy87dJ6yna3s+iFVyU+M9g@mail.gmail.com
Whole thread Raw
Responses Re: Ident authentication failed for user
List pgsql-general
Hi:

I cannot connect to my Postgres database from my PHP scripts. I get the error:

   PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server:
FATAL:  Ident authentication failed for user "postgres" in ...


I have tried many combinations for "host" TYPE in "pg_hba.conf"
(restarting postmaster) without success:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident

# IPv4 local connections:
#20120301 rbz [1291-1292]
#host    all         all         127.0.0.1/32         ident

# IPv6 local connections:
#20120301 rbz [1291-1292]
#host    all         all         ::1/128              ident

#20120301 rbz [1291-1292]
#host    all         all         127.0.0.1/32         trust
#host    all         all         0.0.0.0/0            trust
#host    all         all         *                    trust
host    all         all         127.0.0.1         255.255.255.255   trust
#host    all         all         localhost            trust
host     all        all         ::1/128               trust


Isn't the las record the less restrictive configuration for "host" connections?

I can connect to psql witout any problem.

Thanks in advance for any help.

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: 100% cpu usage on some postmaster processes kill the complete database
Next
From: Adam Bruss
Date:
Subject: Re: accumulating handles problem on machine running postgresql