Re: Connect error

From: Bill Moseley <moseley(at)hank(dot)org>
To: Russell Shaw <rjshaw(at)iprimus(dot)com(dot)au>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Connect error
Date: 2004-01-12 15:42:41
Message-ID: 20040112154241.GA559@hank.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hank(dot)org

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2004-01-12 16:04:53 Re: Connect error
Previous Message Bruno Wolff III 2004-01-12 15:39:59 Re: date comparison between perl and postgres