Re: login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik" - Mailing list pgsql-novice

From Tom Lane
Subject Re: login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik"
Date
Msg-id 2315.1289596059@sss.pgh.pa.us
Whole thread Raw
In response to login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik"  (Jaromír Kamler <kamler@centrum.cz>)
List pgsql-novice
=?UTF-8?B?SmFyb23DrXIgS2FtbGVy?= <kamler@centrum.cz> writes:
> But web browser writes this error:
> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL:  password authentication failed for user "***"
FATAL: password authentication failed for user "***" in /var/www/test/index.php on line 6  Warning: pg_last_error(): No
PostgreSQLlink opened yet in /var/www/test/index.php on line 7 Could not connect:  

What it looks like is your script isn't supplying the right password.

> When I delete in PHP script in pg_connect host="localhost", then all
> works fine, because I use UNIX domain socket (I am thinging ...),

You've got auth method set to "trust" for local connections, so in that
case it's not going to matter whether the script has the right password.

            regards, tom lane

pgsql-novice by date:

Previous
From: Jaromír Kamler
Date:
Subject: login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik"
Next
From: "Donald Kerr"
Date:
Subject: Re: Postgres Wishlist