连接授权问题吧,把你的pgsql的data目录下的pg_hba.conf最后几行改成这样看看:
# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
 
local   all         all                                             trust
# IPv4-style local connections:
host    all         all         127.0.0.1         0.0.0.0           trust
# IPv6-style local connections:
host    all         all         0.0.0.0           0.0.0.0           md5另外启动数据库时加 -i 参数启动TCP连接服务