From: Michael Rasmussen Date: Sat, 11 Aug 2018 22:42:27 +0000 (+0200) Subject: Wrong connect string for MySQLdb X-Git-Url: http://git.datanom.net/securemail.git/commitdiff_plain/d5c0fb7f6094e499940dfdc27a39527e94329cb7 Wrong connect string for MySQLdb --- diff --git a/db.py b/db.py index e595396..93eea09 100644 --- a/db.py +++ b/db.py @@ -79,7 +79,7 @@ class DB: if self.conn is None: if DBTYPE == 'mysql': import MySQLdb - self.conn = MySQLdb.connect(host=DBHOST, port=DBPORT, user=DBUID, password=DBPWD, database=DBNAME) + self.conn = MySQLdb.connect(host=DBHOST, port=DBPORT, user=DBUID, passwd=DBPWD, db=DBNAME) elif DBTYPE == 'postgresql': import psycopg2 self.conn = psycopg2.connect(host=DBHOST, port=DBPORT, user=DBUID, password=DBPWD, dbname=DBNAME)