2016-12-17 38 views
0

我安裝成功通過自制的Postgres,我把它做Postgres的服務器上運行,但postico,pgAdmin的不能訪問它

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

所以自動運行,現在我可以訪問從我的終端psql裏(我用iterm2 +哦,我的zsh)

psql (9.6.1) 
Type "help" for help. 

ty2kim=# 

的問題是,Postgres的管理工具,如postico,pgAdmin的不能訪問它

爲postico,亂七八糟的錯誤年齡

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

這是奇怪,因爲從我的理解,訪問來自終端和管理工具的數據庫基本上是相同的配置是否正確

我的pg_hba.conf和postgresql.conf中被設置爲默認值(沒有做任何改變那裏),但我想這樣做

listen_addresses = 'localhost' 
=> 
listen_addresses = '*' 
(restart server) 

仍然沒有工作

請幫忙!

回答

0

端口5435不是PostgreSQL的標準。你確定PG正在運行嗎?如果你沒有在postgresql.conf中修改它,它必須是5432.請檢查它。

0
  1. 必須檢查pg_hba.conf。如果沒有太多的限制,您可以通過下面的線把這個文件的末尾: 主機的所有一切的一切信任

之後,重新加載/重啓實例。

  1. 檢查您的PC是否使用防火牆。如果是,請關閉它。
相關問題