Имеется:
Ubuntu 16.04.1 LTS
root@Ubuntu-1604-xenial-64-minimal ~ # uname -r
4.4.0-47-generic
PostgreSQL 9.5
root@Ubuntu-1604-xenial-64-minimal ~ # service postgresql status
● postgresql.service - LSB: PostgreSQL RDBMS server
Loaded: loaded (/etc/init.d/postgresql; bad; vendor preset: enabled)
Active: active (exited) since Thu 2016-12-01 02:21:43 UTC; 3 days ago
Docs: man:systemd-sysv-generator(8)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
При попытке подключиться к СУБД:
root@Ubuntu-1604-xenial-64-minimal ~ # psql -h localhost -p 5432 -U postgres -W
Password for user postgres:
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Далее немного подробностей по командам - пустая выдача
root@Ubuntu-1604-xenial-64-minimal ~ # netstat -pant | grep postgres
root@Ubuntu-1604-xenial-64-minimal ~ #
root@Ubuntu-1604-xenial-64-minimal ~ # sudo su - postgres -c 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"?
root@Ubuntu-1604-xenial-64-minimal ~ # ps aux|grep postgres
root 29349 0.0 0.0 16976 936 pts/0 S+ 12:00 0:00 grep --color=auto postgres
less /etc/postgresql/9.5/main/postgresql.conf
# - Connection Settings -
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
# (change requires restart)
В БД есть нужные данные, поэтому снести и заново поставить просто не могу(
Случилось это при перезагрузке сервера.
Что же делать, как же быть? Как все это починить?