Re: authentication failed

From: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
To: Bogdan Chytrek <roboccc(at)t-online(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: authentication failed
Date: 2003-12-18 15:06:13
Message-ID: 3FE1C265.4020600@lorenso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Bogdan Chytrek wrote:

>Why happens this?
>
>Warning: pg_connect() unable to connect to PostgreSQL server: FATAL:
>IDENT authentication failed for user "bchytrek" in
>/var/www/html/physio2/test.php on line 19
>
>The php-statement is :
>
>$conn = pg_connect("dbname=testdb user=bchytrek");
>
>the owner of that testdb is bchytrek and he does not have a password, he
>is in the users-list as superuser, an may cerate dbs.
>
>So why does the authentication fail?
>
>
>
Check your pg_hba.conf and postgresql.conf files.

I bet you forgot to turn on tcp/ip sockets, didn't you ;-)

On my RedHat 9 box:

-- /var/lib/pgsql/data/pg_hba.conf

#TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 0.0.0.0 0.0.0.0 trust

-- /var/lib/pgsql/data/postgresql.conf

tcpip_socket = true

Try starting with something like THIS ... then tighten the security
after you get it to start working.

Dante

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-12-18 15:25:10 Re: BLOBS : how to remove them totally
Previous Message Alvaro Herrera 2003-12-18 14:48:32 Re: pqReadData() -- read() failed: errno=32