Обсуждение: Accessing Windows install of PostgreSQL via cygwin

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

Accessing Windows install of PostgreSQL via cygwin

От
nerdydork
Дата:
I have had a development environment set up in Windows for Django.
Recently I moved all my python/django setup to cygwin because I got
tired of the windows command line.

Everything seems to be working except the PostgreSQL connection. I
understand that I can install postgres inside of cygwin and access it
there, but is it possible to access my windows install of postgres
from within cygwin? If so, how? I get errors trying to connect to
localhost:54


  File "/usr/lib/python2.5/site-packages/django/db/backends/
postgresql_psycopg2/base.py", line 98, in _cursor
    self.connection = Database.connect(**conn_params)
psycopg2.OperationalError: could not connect to server: No such file
or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?32

Re: Accessing Windows install of PostgreSQL via cygwin

От
Filip Rembiałkowski
Дата:
You can see that python is trying to connect to postgres via unix
socket.  In cygwin that's rather not possible.
Just switch the client to TCP mode.  There should be host/port in
connection settings.

2010/4/1, nerdydork <dustin.davis@gmail.com>:
> I have had a development environment set up in Windows for Django.
> Recently I moved all my python/django setup to cygwin because I got
> tired of the windows command line.
>
> Everything seems to be working except the PostgreSQL connection. I
> understand that I can install postgres inside of cygwin and access it
> there, but is it possible to access my windows install of postgres
> from within cygwin? If so, how? I get errors trying to connect to
> localhost:54
>
>
>   File "/usr/lib/python2.5/site-packages/django/db/backends/
> postgresql_psycopg2/base.py", line 98, in _cursor
>     self.connection = Database.connect(**conn_params)
> psycopg2.OperationalError: could not connect to server: No such file
> or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?32
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
Wysłane z mojego urządzenia przenośnego

Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/