Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
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. –  Andre Joost 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 –  Andre Joost Feb 7 '13 at 7:34

1 Answer 1

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

 
discard

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.