2

When I try to connect to a small localhost PostGIS database using QGIS, I get the error message:

FATAL: no pg_hba.conf for host "fe80::4528:3236:418a9e7b%10" user "postgres", database "nyc", SSL off

The file pg_hba.conf contains

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 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

I can connect just fine using pgAdmin. I noticed that a few others have asked similar questions here, but I can´t find a solution using localhost. Any suggestions on what to try? QGIS 1.8.0 and PostgreSQL 9.2/PostGIS 2 on Win Vista 64 bit.

PostGIS Connection

  • 1
    Is "fe80::4528:3236:418a9e7b%10" really the name of the host? What have you specified as connection parameters? On Windows 7, I can even let the host name free, giving only port, database name and username. – AndreJ Feb 6 '13 at 21:05
  • 1
    Is postgres actually serving on port 5432 (the default)? – WolfOdrade Feb 7 '13 at 0:02
  • 2
    In my configuration, I have Dator=localhost, checked 'public' schema and Use estimated table metadata – AndreJ Feb 7 '13 at 7:34
4

If the database runs on localhost, you should specify localhost in the Host field which seems to be called "Dator" in your screenshot.

  • Ah, thanks. That helped. Why didn´t I try that before? – johnrobot Feb 7 '13 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.