[Gfoss] postgres 8.4 sotto ubuntu 11.10 - non si può connettere al server

Se da terminale come root lancio psql ricevo questo errore.

psql: could not connect to server: File o directory non esistente
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5433”?

So per certo che il mio server gira sulla porta 5432…mi ci collego con pgAdmin…

c’è modo per indirizzare psql alla porta corretta?

Grazie a tutti

Ciao
Luca

On Sat, Feb 04, 2012 at 01:10:56PM +0100, Luca Mandolesi wrote:

Se da terminale come root lancio psql ricevo questo errore.

psql: could not connect to server: File o directory non esistente
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"?

So per certo che il mio server gira sulla porta 5432...mi ci collego con
pgAdmin...

"accepting connections on Unix domain socket" e' la chiave.
Prova ad esportare PGHOST=localhost, che magari e' il modo
in cui si collega pgAdmin.

c'è modo per indirizzare psql alla porta corretta?

psql --help
Vedi --host e --port

--strk;

  ,------o-.
  | __/ | Thank you for PostGIS-2.0 Topology !
  | / 2.0 | http://www.pledgebank.com/postgistopology
  `-o------'

Grazie sandro!!! Tutto risolto…non so cosa abbia combinato, di sicuro avevo installato postgresql con il download di enterpriseDB, però posizionandomi sulla cartella con dentro i vari pg_dump, psql, ecc, sono riuscito a dublicare il mio DB e tutto funzia…a parte i bachi del MIO CODICE PYTHON…arghh!

Grazie a tutti come sempre!

Ecco il post, con tanto di citazione della GFOSS.it

Ciao

Luca

2012/2/4 Sandro Santilli <strk@keybit.net>

On Sat, Feb 04, 2012 at 01:10:56PM +0100, Luca Mandolesi wrote:

Se da terminale come root lancio psql ricevo questo errore.

psql: could not connect to server: File o directory non esistente
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5433”?

So per certo che il mio server gira sulla porta 5432…mi ci collego con
pgAdmin…

“accepting connections on Unix domain socket” e’ la chiave.
Prova ad esportare PGHOST=localhost, che magari e’ il modo
in cui si collega pgAdmin.

c’è modo per indirizzare psql alla porta corretta?

psql --help
Vedi --host e --port

–strk;

,------o-.
| __/ | Thank you for PostGIS-2.0 Topology !
| / 2.0 | http://www.pledgebank.com/postgistopology
`-o------’

pyarchinit-sotto-ubuntu-1110