Re: hi i need to connect database from my system to another

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: "Penchalaiah P(dot)" <penchalaiahp(at)infics(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: hi i need to connect database from my system to another
Date: 2006-07-03 13:09:46
Message-ID: 20060703130946.97239.qmail@web31814.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I am using windows xp operating system...
> I want to know how to connect remote postgresql from my system.. I need
> brief description from beginning..
> Now I am using pg_HBF conf file to connect remote postgresql in that I
> am giving host name , ip-address,mask and trust... but it is showing
> error like
>
> Could not connect to server: connection refused(0x0000274d\10061)
> Is the server running on host 127.0.0.1 and accepting TCP\IP connection
> on port 5432 ?

Actually, your PostgreSQL server is running on the IP address that is assigned to that computer.

The 127.0.0.1 in the pg_hba.conf file is the initial accepted client IP address that your
postgresql server will accepted connections from. 127.0.0.1 is basically means localhost. So,
your pg_hba.conf file is initial configured to only allow client connections from itself.

So in this case, if you want to connect from an IP address from a different computer, you will
need to specify that ip address in your pg_hba.conf file as well as the permissions.

But just to get started, you could try editing a line in your pg_hba.conf to this:

#host all all 127.0.0.1/32 md5

host all all <your client ip address goes here>/24 trust
host all all 127.0.0.1/32 trust

To understand all of this, you will need to read the introduction in your pg_hba.conf file. Also,
keep in mind that the above change is basically an "open door" to everything in your DB server.
So after you've had a change to get familiar with everything, you will want to tighten up on
how,what, and how access is granted to you system.

"Last but not least", you will need to restart your postgresql service so these changes will take
effect.

This should get you connected.

Regards,

Richard Broersma Jr.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel Caune 2006-07-03 15:34:36 Local variable and column name conflict
Previous Message Penchalaiah P. 2006-07-03 12:46:07 Re: hi i need to connect database from my system to another