PostgreSQL pg_hba.conf问题

Nic*_*net 8 postgresql pgadmin

在pg_hba.conf中,我有

host    all             all             127.0.0.1/32            md5
host    all             all             samenet            md5
Run Code Online (Sandbox Code Playgroud)

我还补充道

host    all             all             samehost            md5
Run Code Online (Sandbox Code Playgroud)

双方.

我正在使用pgAdminIII,尝试创建"新服务器注册".当我连接到(localhost)时,它工作正常.但当我将主机更改为实际的工作站名称时,它说:

FATAL: no pg_hba.conf entry for host "fe80::c81c:9e9c:6570:d0bf%20", user "postgres", database "postgres", SSL off 
Run Code Online (Sandbox Code Playgroud)

附加信息

  • 操作系统:Windows 7旗舰版32位
  • PostgreSQL Server 9.0.2

任何有关这方面的帮助将受到高度赞赏.

use*_*564 6

这是在启用了IPv6的Windows计算机上安装PostgreSQL的问题.临时解决方法将通过参数"-h 127.0.01",如本文所述.

http://postgresql.1045698.n5.nabble.com/FATAL-no-pg-hba-conf-entry-for-host-1-td1873063.html


nul*_*ull 5

这已由其他用户在此处回答,但我想在此处显示答案以使其他人更清楚:

在 pg_hba.conf 中,像这样添加你的 ipv6 地址:

host      all        all       fe80::c81c:9e9c:6570:d0bf/128       md5
Run Code Online (Sandbox Code Playgroud)

fe80::c81c:9e9c:6570:d0bf 是你的 ipv6 地址。