Answer the question
In order to leave comments, you need to log in
Why can't connect to psql?
Help me please.
pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all 0.0.0.0 password
# IPv4 local connections:
host all all 0.0.0.0 password
# IPv6 local connections:
host all all ::1/128 md5
$ sudo -i -u postgres
$ psql
$ 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"?
Answer the question
In order to leave comments, you need to log in
I don't remember what changed. pg_hba.conf I now have this:
It is important not password but md5
netstat -tnlp Is
postgresql running?
if not, run
/etc/init.d/postgresql start
If it doesn't start there is a log
cat /var/lib/postgresql/pgstartup.log
/var/run/postgresql/.s.PGSQL.5432 check for this file. The default can be 5433. To add 32 in the psql settings change the port.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question