Re: Connect error - Mailing list pgsql-novice

From Bill Moseley
Subject Re: Connect error
Date
Msg-id 20040112154241.GA559@hank.org
Whole thread Raw
In response to Connect error  (Russell Shaw <rjshaw@iprimus.com.au>)
Responses Re: Connect error
List pgsql-novice
On Tue, Jan 13, 2004 at 02:33:20AM +1100, Russell Shaw wrote:
> Hi,
>
> I created a database in debian using psql (as database user russell). My
> php4 script
> can't access it. It reports:
>
>   Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL:
>       IDENT authentication failed for user "russell" . in
>       /home/russell/public_html/hello.php on line 2

I don't know php, but is it (or Apache) running as user russell?  If
not, then you can't authorize by IDENT.

> I have apache-1.3 running ok. In /etc/postgresql/pg_hba.conf, i
> have "ident sameuser". I can access the database ok from my user
> account using psql. What can i check now?

I added lines to pg_hba.conf for the md5 method.  For example:

local   foo_db     foo_user                                        md5
host    foo_db     foo_user    127.0.0.1         255.255.255.255   md5




--
Bill Moseley
moseley@hank.org


pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: date comparison between perl and postgres
Next
From: Bruno Wolff III
Date:
Subject: Re: Connect error