I recently upgraded to Natty (Ubuntu 11.04) and now my postgresql does not seem to connect.
I am using pgadmin3 which throws the following error:
could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?
typing psql
on the terminal gives the following error:
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"?
following are the files under var/run/postgresql/
total 8
drwxrwsr-x 2 postgres postgres 100 2011-05-15 14:35 .
drwxr-xr-x 19 root root 720 2011-05-15 14:35 ..
-rw------- 1 postgres postgres 5 2011-05-15 14:35 8.4-main.pid
srwxrwxrwx 1 postgres postgres 0 2011-05-15 14:35 .s.PGSQL.5433
-rw------- 1 postgres postgres 34 2011-05-15 14:35 .s.PGSQL.5433.lock
netstat shows
sudo netstat -lp | grep postgresql
unix 2 [ ACC ] STREAM LISTENING 7763 1025/postgres /var/run/postgresql/.s.PGSQL.5433
I believe the problem is that its looking to start on 5432
but it should be starting in 5433
but how do I change this??