2017-02-13 36 views
1

我剛剛安裝了pgAdmin-4,並嘗試連接到與其一起安裝的默認服務器(PostgreSQL 9.5)。它要求輸入密碼(我假設默認情況下它的「Postgres的」),但是,我不斷收到以下消息:無法連接到pgAdmin的默認服務器4

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

我的工作在Windows 7

任何想法如何解決這個問題?

回答

0

第一件事是從問題中刪除pgadmin。嘗試使用psql連接命令行 - 如果您收到相同的消息,則說明問題不在pgadmin中。如果問題繼續使用psql,那麼可能您的postgresql配置不完整。該問題可能在文件pg_hba.conf中 - 該文件控制誰可以連接到後端。您也可以使用適當的Windows實用程序檢查服務器應用程序是否正在運行。