我錯過了一些chmod和權限。 現在有很多訪問文件夾的問題。權限在postgres中被拒絕
如果我啓動服務器我看到瀏覽器:
could not connect to server: Connection refused Is the server running
on host "localhost" (::1) and accepting TCP/IP connections on port
5432?
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?
命令
服務--status-所有
告訴Postgres的工作
[ +] postgresq作品
接下來,我旁邊的文件
改變須藤納米/etc/postgresql/9.5/main/postgresql.conf
#listen_addresses = 'localhost'
到
listen_addresses = 'localhost, server_ip, *'
sudo nano/etc/post gresql/9.5 /主/ pg_hba.conf裏
添加
host all all server_ip/24 trust
然後命令
PSQL -U postgres的-h SERVER_IP
和錯誤
psql: could not connect to server: Connection refused
Is the server running on host "95.213.200.26" and accepting
TCP/IP connections on port 5432?
The following chain of actions leads to a slightly different error
命令
這PSQL
答案
/usr/bin/psql
須藤蘇 - Postgres的
No directory, logging in with HOME=/
組PSQL
psql: could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
至極文件的權限做我必須在這裏改變?
運行作爲根'找到/ -name .s.PGSQL.5432'?.. –
它回答/tmp/.s.PGSQL.5432 –
/run/postgresql/.s.PGSQL.5432 –