psql:无法连接到Linux上的服务器

时间:2017-01-21 04:36:54

标签: linux postgresql debian psql postgresql-9.4

我在Linux上安装了PostgreSQL,如何在Debian Wiki

中指出

安装后,我运行以下命令:

# su - postgres
$ psql

我收到以下错误:

  

psql:无法连接到服务器:没有这样的文件或目录           服务器是在本地运行还是接受           Unix域套接字上的连接" /tmp/.s.PGSQL.5432"?

我找到了解决方案,但对于Mac

Postgres could not connect to server https://dba.stackexchange.com/questions/75214/psql-could-not-connect-to-server-no-such-file-or-directory

如何在Linux中解决此问题?

分发详情:

Distributor ID : Debian
Description    : Debian GNU/Linux 8.7 (jessie)
Release        : 8.7
Codename       : jessie

PostgreSQL     : 9.4

0 个答案:

没有答案
相关问题