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-15 16:19:19
Message-ID: d86a77ef0608150919k3077ae8idace8efa7e9210c5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

in my previous mail both the ip addressed should be read as 192.168.0.123...
.
thanks
harpreet

On 8/15/06, Harpreet Dhaliwal <harpreet(dot)dhaliwal01(at)gmail(dot)com> wrote:
>
> Hi Micheal,
> sudde2nly a problem has cropped up in my connection.
> Its kind of strange.
>
> ECPGdegug(1, stderr) says
>
> [9852]: connect: cold not open database dbxyz on 192.168.0.123 port 5432
> for user jsb in line 16
> could not connect to server: No route to host
> Is the server running on host "192.168.0.110" and accepting
> TCP/IP connections on port 5432?
>
> My server is very much running.
> I also made sure that TCP/IP connection is being accepted on port 5432
> using nmap -sS localhost in my database server.
>
> Don't know whats wrong now
>
> Also, just an observation (don't know if that is the cause or not) In my
> clinet machine while compiling my test.c file using
> gcc -o test test.c -lecpg -L/usr/lib/pgsql
> there's not pgsql directory in /usr/lib.
> Where exactly do i have to do this linking thing and to what I have to
> link it.
>
> Thanks
> ~Harpreet
>
> On 8/13/06, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
>
> > On Sun, Aug 13, 2006 at 07:07:11PM -0400, Harpreet Dhaliwal wrote:
> > > 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?
> >
> > You might want to add 192.168.0.0/24 on another line rather than
> > replacing 127.0.0.1. And allowing "trust" connections is bad
> > security practice because anybody on one of the allowed IP addresses
> > could connect as any user without being challenged for a password.
> > Consider using a stronger authentication method and modifying the
> > client code accordingly.
> >
> > http://www.postgresql.org/docs/8.1/interactive/auth-methods.html
> >
> > --
> > Michael Fuhr
> >
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2006-08-15 16:21:00 Re: Partial indexes Vs standard indexes : Insert
Previous Message Harpreet Dhaliwal 2006-08-15 16:11:36 Re: Connection string