Re: remote connection problem

From: Michael Wood <esiotrot(at)gmail(dot)com>
To: Ilija Vidoevski <ilija(at)fructal(dot)com(dot)mk>, pgsql-novice(at)postgresql(dot)org
Subject: Re: remote connection problem
Date: 2012-05-16 21:25:52
Message-ID: CAP6d-HVcvMOENyZezDrDpe73w4B0r8EPEzsy45JK4S=3dCVb5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sorry for top posting. Replying from my phone and it does not allow
any other option. If I understand you correctly it works when you run
it on the same machine as the database server, but not when the client
is a different machine from the server? If that is the case then you
have specified the wrong host name in your connection string.
Localhost means "this machine". i.e. the machine that the client is
running on. So if you want to connect to another machine you must
specify that machine's name or address instead of localhost.

On 5/16/12, Ilija Vidoevski <ilija(at)fructal(dot)com(dot)mk> wrote:
> I can not access to postgresql server 9.1.3 form client computer with
> front-end application written in MS Visual Foxpro 9 SP2.
>
>
>
> Application made connection when work on PC where is postgresql server
> installed.
>
>
>
> Connstr="DRIVER={PostgreSQL odbc
> driver(unicode)};server=localhost;Port=5432;Database=mydatabase;
> Uid=postgres;Pwd=mypwd;UseServerSidePrepare=1;MaxVarcharSize=254;UnknownsAsL
> ongVarchar=0;TextAsLongVarchar=0;"
>
>
>
> I installed ODBC driver v 09.00.0310-1 on client PC. Also firewall is
> disabled on server side.
>
>
>
> This a settings in postgresql.conf file:
>
> listen_addresses = '*'
>
>
>
> This a settings in pg_hba.conf file:
>
> # IPv4 local connections:
>
> host all all 0.0.0.0/0 md5
>
> # IPv6 local connections:
>
> host all all ::0/0 md5
>
>
>
> I got this message:
>
> Connectivity error: Could not connect to server;
>
> No connection could be made because the target machine actively refused it
> (127.0.0.1:5432)
>
>
>
> Any ideas what is wrong ?.
>
>
>
> Thank's
>
> Ilija
>
>
>
>

--
Michael Wood <esiotrot(at)gmail(dot)com>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Daniel Staal 2012-05-16 23:34:32 Re: Text search language field
Previous Message Jean MAURICE 2012-05-16 16:29:25 Re: remote connection problem