Connect to PostgreSQL localhost in QGIS

I'll add an answer with a screenshot, as it will be easier to look at for reference.

Here is an example with the absolute minimum you would have to enter. It would connect to a database called twitter, and I would name that connection twitterDB. Note that it does not matter how you name the connection; this is just a name you give to your connection so you can refer to it later on (see last screenshot).

enter image description here

And here a screenshot of the actual database I am connecting to:

enter image description here

In QGIS your connection would show up like this:

enter image description here

Hit the Connect button, and if it worked, the Schema area will be populated, where you can then navigate to your tables.

enter image description here


Name is the name of the database connection, you have to enter username and password below as well. Host should be localhost, not Localhost.

You might need Postgis as well, see

How to fix "Connection failed - Check settings and try again" when connecting to PostGIS?

How to connect to Postgres with QGIS?

qgis to local postgis connection - fails

for further advice.

Tags:

Postgis

Qgis