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.

I have Postgres running via Postgres.app on rails already and am trying to connect QGis to the database.

PostGIS is working already. (questions already found online deal with this issue only)

I do not have a password or username set up for this database, as indicated in my database.yml file for rails:

development:
  adapter: postgis
  encoding: unicode
  postgis_extension: true
  schema_search_path: public,postgis
ffsdfsdfsdf  pool: 5
  database: gisdatabase
  host: localhost

So I've gone into QGis and am trying to set up a new PostGIS connection:

Service:
Host: localhost
Port: 5432
Database: gisdatabase
SSLMode: allow
username: 
password:

I've changed the port around and managed to get this error:

"could not connect to server: Connection refused..."

Changing the port back to 5432, I get a different error, thus indicating that the connection is not being refused:

"Connection failed - Check settings and try again."

I'm thinking that perhaps its the blank "Service" form or perhaps an error with the empty username and password fields that are causing the error, but I don't really know.

I've tried to find the correct Service name but have been unsuccessful

share|improve this question
    
I would add a username/password (even if it is the same). sounds like you need to edit the pg_hba.conf file postgresql.org/docs/9.1/static/auth-pg-hba-conf.html –  Mapperz Aug 23 '13 at 17:04

1 Answer 1

In my experience, QGIS won't accept a connection without username and password. You will have to set one.

share|improve this answer

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.