I am having trouble connecting to a PostgreSQL database hosed on my local host. I have a Python script to connect and connected through the command line, but for the life of me can't connect to a the database from QGIS. Here is the Python code I got to work:
import psycopg2 try: conn = psycopg2.connect("dbname='mb_sed_class' user='postgres' host='localhost' password='Daniel'") except: print "I am unable to connect to the database" print ("I connected to the database") cur = conn.cursor() cur.execute("select relname from pg_class where relkind='r' and relname !~ '^(pg_|sql_)';") print cur.fetchall()
This connected to the database and returned the names tables. And here is how I connected to it from the command line:
psql -d mb_sed_clsss -U postgres
The command line prompted me to input my password and it opened the psql interpreter.
A screen shot of my Create a New PostGIS Connection dialog can be found here. When I try an connect with those inputs I get the error:
FATAL: pssword Authentication failed for user "postgres"
Any ideas on why this might be happening?
I am running QGIS 2.8.2 and PostgreSQL 9.4 on windows 8 64 bit machine.