I am using QGIS 3.4.6 and I have a project file which was set up with a PostGIS database connection with basic authentication prompting for a username and password. This was stored as plain text in the project file.

Recently the person who manages the PostGIS database changed the password but kept the username the same. This has prompted QGIS to ask for the database credentials whenever the project file is now opened or any past projects that I have worked on.

enter image description here

If I enter the credentials that a connection is made so I know that this is all correct, however if I edit the database connection with the new password and re-save the project file I am still asked for the credentials on start-up.

enter image description here

I have saved the new credentials and stored them as plain text in the project file as before. Interestingly, when I open the project and check the credentials the new ones have been saved.

Does anyone know how I can overcome this and get my project file to remember my user credentials?

| improve this question | | | | |
  • 1
    You should look around the postgress file pg_pass.conf. You should be able to register some login in this file. Doc : docs.postgresql.fr/10/libpq-pgpass.html – Maximilien jaffrès May 3 '19 at 8:20
  • I cannot seem to locate this file in the QGIS environment - do you know where it is located? – AWGIS May 8 '19 at 15:33
  • i think standard location is under : C:\Users\user\AppData\Roaming\postgresql. But i am not sure it's mandatory location – Maximilien jaffrès May 9 '19 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.