pgadmin fails to connect

Поиск
Список
Период
Сортировка
Искать

pgadmin fails to connect

От:
"Helen Hudson" <helen@rttc.co.za>
Дата:
I'm so excited about getting postgres running on my windows xp.  Installed
pgadmin fine. Installed cygwin, installed and started postgres ok... or so I
thought.  But then I had a connection problem from pgadmin and, from reading
the documentation, it seems that I've made the common error of forgetting to
configure the server to allow TCP/IP connections.

From pgadmin, I get the error:

psql: could not connect to server: Connection refused
        Is the server running on host "127.0.0.1" and accepting
        TCP/IP connections on port 5432?

I've tried starting the postmaster with the -i option.  I looked at the
documentation and, in cygwin, the command line I used was:

postmaster -i -D /usr/local/pgsql/data > logfile 2>&1 &

But still no joy.  I'm sure it must be a simple thing... any advice
appreciated!

Helen

Re: pgadmin fails to connect

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:
Hi Helen, 

> -----Original Message-----
> From: Helen Hudson [mailto:helen@rttc.co.za] 
> Sent: 28 November 2003 12:06
> To: pgsql-cygwin@postgresql.org
> Subject: [CYGWIN] pgadmin fails to connect
> 
> I'm so excited about getting postgres running on my windows 
> xp.  

Always a good sign :-)

> Installed pgadmin fine. Installed cygwin, installed and 
> started postgres ok... or so I thought.  But then I had a 
> connection problem from pgadmin and, from reading the 
> documentation, it seems that I've made the common error of 
> forgetting to configure the server to allow TCP/IP connections.

Yup, that's almost always what causes this error.

> From pgadmin, I get the error:
> 
> psql: could not connect to server: Connection refused
>         Is the server running on host "127.0.0.1" and accepting
>         TCP/IP connections on port 5432?
> 
> I've tried starting the postmaster with the -i option.  I 
> looked at the documentation and, in cygwin, the command line 
> I used was:
> 
> postmaster -i -D /usr/local/pgsql/data > logfile 2>&1 &
> 
> But still no joy.  I'm sure it must be a simple thing... any 
> advice appreciated!

Did the postmaster definitely restart? Try restating your PC to be sure.

You might also try configuring it from $PGDATA/postgresql.conf rather
than the command line. Shouldn't make a difference, but it's usually
less troublesome in the longterm if you intend to start the postmaster
by hand when required. 

As a final test, try connecting using psql on the command line:

$ psql -h 127.0.0.1 -Uusername template1

You might also need to edit $PGDATA/pg_hba.conf to allow access, but
that will give a different error to the one you are seeing at the
moment.

Regards, Dave.

unsubscribe

От:
"sympatico" <yadong.zhang@sympatico.ca>
Дата:
FAQ