目录
环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7,Linux x86-64 Red Hat Enterprise Linux 6,Linux x86-64 Red Hat Enterprise Linux 5
版本:4.1.1
症状
使用psql连接数据库报错:could not connect to server: No such file or directory
[highgo@hgdb ~]$ psql -p 5866 -U highgo -d highgo
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.5866"?
问题原因
出现该报错可能的原因有:
1、数据库服务未启动
2、修改过unix_socket_directories参数
3、数据库端口错误
4、套接字文件被误删除
综上,有多种原因会导致出现该报错,需要一步步排查问题原因。
详细的解决方案请登录【瀚高技术支持平台】查看