ZeosDBO 7.2.1 and PostgreSQLL pg_hba.conf error
Posted: 19.08.2017, 11:25
Hi,
I make a connection to PostgreSQL 9.6 with Delphi 7 and ZeosDBO 7.2.1-rc on my local computer. The database is on my local computer. If the HostName property of TZConnection set to "localhost" then it works perfectly.
If I set the HostName property to my computer name (my local computer name) "OFFICE-201" then it will error:
SQL Error: FATAL: no pg_hba.conf entry for host "fe60::53ba28f3:84fa%11", user "admin", database "myDB", SSL off.
I already set the file pg_hba.conf on my C:\Program Files (x86)\PostgreSQL\9.6\share folder. My pg_hba.conf setting is:
@authcomment@
# TYPE DATABASE USER ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
#host all all 127.0.0.1/32 @authmethodhost@
host all all 0.0.0.0/0 password
# IPv6 local connections:
host all all ::1/128 @authmethodhost@
# Allow replication connections from localhost, by a user with the
# replication privilege.
@remove-line-for-nolocal@#local replication @default_username@ @authmethodlocal@
#host replication @default_username@ 127.0.0.1/32 @authmethodhost@
#host replication @default_username@ ::1/128 @authmethodhost@
Is there any wrong setting of my pg_hba.conf? I want to set it, so my program can access the database from any computer on LAN/WAN.
Thank you
I make a connection to PostgreSQL 9.6 with Delphi 7 and ZeosDBO 7.2.1-rc on my local computer. The database is on my local computer. If the HostName property of TZConnection set to "localhost" then it works perfectly.
If I set the HostName property to my computer name (my local computer name) "OFFICE-201" then it will error:
SQL Error: FATAL: no pg_hba.conf entry for host "fe60::53ba28f3:84fa%11", user "admin", database "myDB", SSL off.
I already set the file pg_hba.conf on my C:\Program Files (x86)\PostgreSQL\9.6\share folder. My pg_hba.conf setting is:
@authcomment@
# TYPE DATABASE USER ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
#host all all 127.0.0.1/32 @authmethodhost@
host all all 0.0.0.0/0 password
# IPv6 local connections:
host all all ::1/128 @authmethodhost@
# Allow replication connections from localhost, by a user with the
# replication privilege.
@remove-line-for-nolocal@#local replication @default_username@ @authmethodlocal@
#host replication @default_username@ 127.0.0.1/32 @authmethodhost@
#host replication @default_username@ ::1/128 @authmethodhost@
Is there any wrong setting of my pg_hba.conf? I want to set it, so my program can access the database from any computer on LAN/WAN.
Thank you