无法访问 psql 数据库。以下是访问数据库时的错误:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
我也尝试寻找 postmaster.pid 但没有找到
最佳答案
你的服务器宕机了,或者至少不在你的 psql 命令认为的地方。您可以在系统中搜索 postgres.conf,它应该告诉您它在哪个端口上,您可以尝试手动启动服务器。我将从寻找 conf 文件开始。/var/log 中可能有日志记录,如果是服务器有问题而不是您不知道端口/数据库名称,您可以检查更多线索。
祝你好运
关于linux - psql: 无法连接到服务器: 没有这样的文件或目录 "Centos7",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45535161/