加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql客户端连接错误的解决方法

发布时间:2020-12-13 17:58:29 所属栏目:百科 来源:网络整理
导读:今天在重新设置postgresql服务器以后却发现启动不了服务器。 错误如下: 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"? 参照官方文

今天在重新设置postgresql服务器以后却发现启动不了服务器。
错误如下:
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"?

参照官方文档如下:


当试图通过一个 Unix 套接字与本机服务器通讯时,你会看到这个:
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"?

最后一行可以有效地验证客户端进行联接尝试时是否连对了位置。如果实际上没有服务器在那里运行,典型的内核错误是象上面显示的那样或者是Connection refused或者是No such file or directory。 (尤其要注意的是这种环境下Connection refused的信息显示并不意味着服务器收到你的联接然后拒绝了联接。 那样的话会产生一个不同的信息,象 Section 20.3 里面显示的那样)似乎还是不能解决问题。实在没办法只有看启动的shell文件,找log日志。FATAL: data directory "/var/data/pgsql" has group or world accessDETAIL: Permissions should be u=rwx (0700).果然。。。。权限被修改了。遇到问题还是看日志最保险。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读