Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaromír Kamler <kamler(at)centrum(dot)cz>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik"
Date: 2010-11-12 21:07:39
Message-ID: 2315.1289596059@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
=?UTF-8?B?SmFyb23DrXIgS2FtbGVy?= <kamler(at)centrum(dot)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 PostgreSQL link 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

In response to

pgsql-novice by date

Next:From: Leon StarrDate: 2010-11-12 21:16:59
Subject: How to properly SET NULL on a delete with two attributes referenced?
Previous:From: Jaromír KamlerDate: 2010-11-12 21:02:37
Subject: login error - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "kamik"

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group