]> git.datanom.net - securemail.git/commitdiff
Wrong connect string for MySQLdb
authorMichael Rasmussen <mir@datanom.net>
Sat, 11 Aug 2018 22:42:27 +0000 (00:42 +0200)
committerMichael Rasmussen <mir@datanom.net>
Sat, 11 Aug 2018 22:42:27 +0000 (00:42 +0200)
db.py

diff --git a/db.py b/db.py
index e5953968d25989b3dd56fb13e528f6f40b5567cb..93eea0991bfd8ac4ca8697bad8fafbd6adba0af5 100644 (file)
--- 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)
This page took 0.069371 seconds and 5 git commands to generate.