I want to import shp to to postgreSQL with the spit plugin. Testing the database connection to my PostGIS database ist successfully (I already imported layers with this connection via the "add postGIS Layer" button), but if i try to connect to my db within the spit dialogue, entering the password, there will be an error message "connection failed".

I tried to use the DB Manager, three times I entered the password, then error message "unable to connect fe_sendauth: no password supplied" .. don't know, if this error is related to the above.

Have got Win7 with QGIS 1.8 and PostgreSQL 9.2. I supplied a passowrd during PostgreSQL installation to the superuser. Editing pg-hba.conf without success. In fact, couldn't connect in pgAdmin after appending the conf-file. hopefully, going to do the whole QGIS-PostgreSQL-installation on another machine this month.

Thanks to your answer and comment, @underdark und @RomaH!

  • 1
    are your postgresql and qgis on the same machine or remote?
    – urcm
    Nov 19, 2012 at 11:23
  • At the moment both are running local.
    – AnS
    Nov 19, 2012 at 12:26
  • .. same machine, no remote (connection via localhost and port 5433).
    – user12953
    Nov 20, 2012 at 21:40
  • Is this is answered?
    – Zach
    May 24, 2013 at 14:53
  • Not sure..Is your machine 32 bit or 64 bit ? (If 64 bit then try ton install 32 bit version for PostgreSQL and PostGIS)
    – Sunil
    Jun 24, 2013 at 7:01

1 Answer 1


The two are most likely related. A common reason for this error is not supplying a password when needed or the postgres user was created without a password and you are supplying a password.

Which OS are you using? What user are using to connect with?

Try adding a password to your user: alter user myname with password 'mypassword'; And try logging in again.

Otherwise you can try editing /etc/postgresql/x.x/main/pg-hba.conf, replace X.x with your version.

Add at the bottom:

local   all    all                        trust

This should allow anyone on your local machine to get access without a password.

  • Don't forget to restart postgres after editing the .conf files either
    – djq
    Oct 26, 2013 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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