Re: authentication failed - Mailing list pgsql-general

From D. Dante Lorenso
Subject Re: authentication failed
Date
Msg-id 3FE1C265.4020600@lorenso.com
Whole thread Raw
In response to authentication failed  (roboccc@t-online.de (Bogdan Chytrek))
List 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




pgsql-general by date:

Previous
From: roboccc@t-online.de (Bogdan Chytrek)
Date:
Subject: authentication failed
Next
From: Tom Lane
Date:
Subject: Re: BLOBS : how to remove them totally