Search Postgresql Archives

Re: Connection string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux