1
我在本地Windows 7 x64计算机上运行了Postgres 9.5.3
。无法通过名称连接到本地计算机
当我连接到“localhost”时,我的代码工作正常。 如果我的名字连接到我的机器,我得到这个错误:
Opening connection to 'W7_Adam_Benson' on port 5432 as user 'postgres'
ERROR: Devart.Data.PostgreSql.PgSqlException (0x80004005): no pg_hba.conf entry for host "fe80::6d80:62eb:5bab:f7f6%10", user "postgres", database "postgres", SSL off
很明显它试图与IPV6取代IPV4连接,还等什么?
我pg_hba.conf
看起来是这样的:
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 0.0.0.0/0 md5
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all * md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
host all all * trust
任何帮助感激地接受
非常感谢 - 这让我感到满足。 –
确保你在地址中用'/'替换'%'...至少如果你从PGAdmin错误信息中得到它...... – DPSSpatial