簡體   English   中英

使用最新版本的 Postgresql psql 客戶端工具時無法連接到 Postgres 服務器

[英]Cannot connect to Postgres server when using latest version of Postgresql psql client tool

當我通過 brew 安裝最新版本的 Postgresql(版本 12)並嘗試使用 zsh shell 中的 psql 查詢雲托管數據庫時,我收到以下錯誤: psql: error: could not connect to server: 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 版本 11 時,我可以查詢數據庫。

我團隊中的其他開發人員可以使用最新版本的 Postgresql(版本 12)查詢同一數據庫。

關於有什么問題的任何想法?

聽起來您使用 v12 與 v11 進行不同的連接(不同的 shell,不同的主機,不同的安裝方法,什么?)但不知道完整的連接命令和/或環境信息,這將很難解決。 由於您的同事可以連接到 v12,因此這不是問題。 由於您確實需要更多的支持論壇,我可能建議將此問題提交給 postgres slack 或 postgres 郵件列表。

我通過卸載所有 brew 包、卸載 brew、重新安裝 brew 然后重新安裝所有包(包括 postgresql 版本 12)解決了連接問題。之后,我可以連接到數據庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM