Re: Connection string

From: "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Connection string
Date: 2006-08-13 23:07:11
Message-ID: d86a77ef0608131607t47b0a420w81bf996e1a96451c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael,
Please ignore my last email

At last I got error code 0.

Problem was with pg_hba.conf file

ECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for
localhost only and not for other ip addresses.

I had to change the configuration for IPV4 local connections

It should have been something like

host all all 192.168.0.0/24 trust
instead of
host all all 127.0.0.1/32 trust (which is meant for localhost
only)

I think i got it...right?

thanks alot for your help. Do you anymore inputs or warnings for me on this?

I'm highly obliged MIchael..

Thanks and regards,

~Harpreet

On 8/13/06, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
>
> On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote:
> > -402 sqlcode means "connection attempt to the database did not succeed"
> >
> > does this mean that my application is connecting to the database server
> but
> > somehow failing in connecting to the database dbxyz due to some
> > authentication problems???
>
> What do the server's logs say? Can you connect to the database
> from the same machine using psql? If you add the following line
> to your program before the connect, what output do you get?
>
> ECPGdebug(1, stderr);
>
> --
> Michael Fuhr
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Harpreet Dhaliwal 2006-08-13 23:11:45 Re: Connection string
Previous Message Harpreet Dhaliwal 2006-08-13 22:44:28 Re: Connection string