【发布时间】:2016-12-17 00:03:49
【问题描述】:
我通过自制程序成功安装了postgres,并通过这样做将其设置为自动运行
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
所以,现在我可以从终端访问 psql(我使用 iterm2 + oh my zsh)
psql (9.6.1)
Type "help" for help.
ty2kim=#
问题是,postico、pgadmin等postgres管理工具无法访问
对于 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)
还是不行
请帮忙!
【问题讨论】:
标签: postgresql tcp connection localhost pgadmin