我通过homebrew成功安装了postgres,并通过执行以下操作将其设置为自动运行
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)还是不管用
请帮帮我!
发布于 2016-12-17 20:10:11
端口5435不是PostgreSQL的标准端口。你确定PG在上面运行吗?如果您没有在postgresql.conf中更改它,那么它一定是5432。请检查一下。
发布于 2017-05-04 16:03:26
之后,重新加载/重启实例。
https://stackoverflow.com/questions/41194091
复制相似问题