2016-12-17 20 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是否使用防火墙。如果是,请关闭它。
相关问题