Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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               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            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

share|improve this question
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
Is postgres actually serving on port 5432 (the default)? – WolfOdrade Feb 7 '13 at 0:02
In my configuration, I have Dator=localhost, checked 'public' schema and Use estimated table metadata – AndreJ Feb 7 '13 at 7:34
up vote 4 down vote accepted

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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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