Re: PostgreSQL connect error

From: "devi" <devi(at)visolve(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: <thomas(dot)pundt(at)rp-online(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL connect error
Date: 2009-03-10 11:43:33
Message-ID: 9D69E567BD9F41509E05F35831328274@Devi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Richard,

Thanks & it works..
DEVI.G
----- Original Message -----
From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "devi" <devi(at)visolve(dot)com>
Cc: <thomas(dot)pundt(at)rp-online(dot)de>; <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, March 10, 2009 3:39 PM
Subject: Re: [GENERAL] PostgreSQL connect error

> devi wrote:
>> Hi ,
>>
>> As john suggested, i tried setting up the env .. but that dosen't help
>> out. I tried with IP, instead of localhost in pg_hba.conf.. just trail &
>> error approach...
>
> There is no need to use trial and error - this is covered in the manuals:
> http://www.postgresql.org/docs/current/static/client-authentication.html
>
>> Now.. i'm getting the error as "FATAL: role "apache" does not exist.."..
>>
>> Can U help me out here!!
>
> You're trying to connect with a username of "apache" and you don't have
> that set up in the database.
>
> Stop. Make a good hot cup of tea/coffee and read through the section of
> the manual mentioned above. Disable access from the internet
> (listen_addresses) and set up "trust" access as a first step.
>
> Connect as the postgres user (from psql), add a new database user (e.g.
> "test") with a password (see the manuals for details). Create a database
> owned by them. Now try logging in as that user - no password should be
> necessary.
>
> Edit the pg_hba.conf to require passwords for all users apart from
> "postgres" which you can leave as "ident". Restart the postgresql server
> and try reconnecting as your test user. You should now need a password.
>
> If all that's working, try connecting as your test user from php. Don't
> forget to check result codes when you connect to the database or send a
> query etc.
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Venkat Rao Tammineni 2009-03-10 12:07:38 How to Convert VarChar to Date in PgSQL
Previous Message Karsten Hilbert 2009-03-10 11:39:31 Re: (problem with) encoding of (early-in-connect) PostgreSQL messages