From: | Ruben Blanco <rubenblan(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Ident authentication failed for user |
Date: | 2012-03-01 17:02:58 |
Message-ID: | CAP4Xq2F3=7emtdsOTyvwMEx3=5Nizy87dJ6yna3s+iFVyU+M9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Bruss | 2012-03-01 17:20:48 | Re: accumulating handles problem on machine running postgresql |
Previous Message | Richard Huxton | 2012-03-01 17:02:04 | Re: 100% cpu usage on some postmaster processes kill the complete database |