无法将Postgres与psql连接

时间:2019-06-11 08:39:13

标签: postgresql

我已用sudo service postgresql status检查服务器状态

● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2019-06-11 13:51:09 IST; 15min ago
  Process: 929 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 929 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/postgresql.service

Jun 11 13:51:07 ISW114 systemd[1]: Starting PostgreSQL RDBMS...
Jun 11 13:51:09 ISW114 systemd[1]: Started PostgreSQL RDBMS.
Jun 11 13:56:53 ISW114 systemd[1]: Started PostgreSQL RDBMS.

它工作正常,但是当我尝试使用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"?

0 个答案:

没有答案