环境: CentOS 5, Postgresql 9, WinXp
通过winXP上的psql连接远程服务器上postgresql服务,出现错误:
C:\Documents and Settings\rand>psql -U postgres -d postgres -h 10.71.88.251 -p 5432
psql: 无法联接到服务器: Connection refused (0x0000274D/10061)
服务器是否在主机 "10.71.88.251" 上运行并且准备接受在端口
5432 上的 TCP/IP 联接?
之前配置过pg_hba.conf上的信息:
host all all 10.71.88.252/32 trust --注10.71.88.252为winxp的IP地址
经排错,发现postgresql.conf中有一个监听器地址参数为 #listen_addresses = 'localhost', 必须将其修改为 listen_addresses = '*',以便可以让其它客户端来访问。
通过winXP上的psql连接远程服务器上postgresql服务,出现错误:
C:\Documents and Settings\rand>psql -U postgres -d postgres -h 10.71.88.251 -p 5432
psql: 无法联接到服务器: Connection refused (0x0000274D/10061)
服务器是否在主机 "10.71.88.251" 上运行并且准备接受在端口
5432 上的 TCP/IP 联接?
之前配置过pg_hba.conf上的信息:
host all all 10.71.88.252/32 trust --注10.71.88.252为winxp的IP地址
经排错,发现postgresql.conf中有一个监听器地址参数为 #listen_addresses = 'localhost', 必须将其修改为 listen_addresses = '*',以便可以让其它客户端来访问。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16582684/viewspace-734091/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16582684/viewspace-734091/