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

Поиск
Список
Период
Сортировка
От Richard Broersma Jr
Тема Re: hi i need to connect database from my system to another
Дата
Msg-id 20060703130946.97239.qmail@web31814.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Re: hi i need to connect database from my system to another  ("Penchalaiah P." <penchalaiahp@infics.com>)
Список 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.



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Penchalaiah P."
Дата:
Сообщение: Re: hi i need to connect database from my system to another
Следующее
От: "Daniel Caune"
Дата:
Сообщение: Local variable and column name conflict