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

share|improve this question
1  
are your postgresql and qgis on the same machine or remote? –  Aragon Nov 19 '12 at 11:23
    
At the moment both are running local. –  AnS Nov 19 '12 at 12:26
    
.. same machine, no remote (connection via localhost and port 5433). –  user12953 Nov 20 '12 at 21:40
    
Is this is answered? –  Zach May 24 '13 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 '13 at 7:01
add comment

1 Answer

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.

share|improve this answer
    
Don't forget to restart postgres after editing the .conf files either –  djq Oct 26 '13 at 22:41
add comment

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.