我知道这个问题已经问过很多次了,但这些答案都不适合我。
\n\n问题是,当我运行“psql”时,我收到消息
\n\npsql: could not connect to server: No such file or directory\n Is the server running locally and accepting\n connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?\nRun Code Online (Sandbox Code Playgroud)\n\n当我运行“sudo /etc/init.d/postgresql status\xe2\x80\x9d”时,它说服务正在运行,
\n\npostgresql.service - PostgreSQL RDBMS\nLoaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)\nActive: active (exited) since Tue 2018-07-10 10:51:05 +0530; 22s ago\nProcess: 3219 ExecStart=/bin/true (code=exited, status=0/SUCCESS)\nMain PID: 3219 (code=exited, status=0/SUCCESS)\nRun Code Online (Sandbox Code Playgroud)\n\n但是当我运行 \xe2\x80\x9csudo lsof -i :5432\xe2\x80\x9d 和 \xe2\x80\x9cnetstat -nltp | 时 grep 5432\xe2\x80\x9d 和 \xe2\x80\x9csudo netstat -lp --protocol=unix | grep …
postgresql ×1