Indlæg

Viser indlæg fra november, 2014

Connect to postgresql 9.2 server in openSUSE 13.2

I tried to connect to my postgresql server after upgrading to openSUSE 13.2 from 13.1 using the guide from opensuse.org
That resulted in this error message:

psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

There was no files in /var/run/postgresql/. So that explained why it could not connect to that Unix domain socket.
So where was the socket? Reading this answer I found that I could run this command to figure out where the socket was:
~> netstat -nlp | grep 5432
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      12827/postgres     
tcp        0      0 :::5432                 :::*                    LISTEN      12827/postgres     
unix  2      [ ACC ]     STREAM     LISTENING     10994…