1. 程式人生 > >could not connect to server: No such file or directory

could not connect to server: No such file or directory

目錄

環境

症狀

問題原因

解決方案https://support.highgo.com/#/index/docContent/bd285b047c3cbe

環境

系統平臺: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

 

[[email protected] ~]$ 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、套接字檔案被誤刪除

 

綜上,有多種原因會導致出現該報錯,需要一步步排查問題原因。

詳細的解決方案請登入【瀚高技術支援平臺】檢視