Custom css

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     10994605 12827/postgres      /tmp/.s.PGSQL.543


That indicated that the socket was located at /tmp/ instead of /var/run/postgresql/ I was then able to find an explanation here

With that in mind i tried to connect with /tmp/ as host:
~> psql -h /tmp/
psql (9.3.5, server 9.2.7)
Type "help" for help.


That worked and as you can see the server and the client versions does not match. That could explain why the client was compiled with a different default host. Next thing could be to try to update the server from 9.2 to 9.3.

Ingen kommentarer:

Send en kommentar

Install AWS VPN Client for openSUSE Tumbleweed

Code: curl https://d20adtppz83p9s.cloudfront.net/GTK/latest/awsvpnclient_amd64.deb -o awsvpnclient_amd64.deb sudo zypper in alien alien --t...