diff options
-rw-r--r-- | dash/db.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7,7 +7,7 @@ c = configparser.ConfigParser() c.read('config.ini') def getConnection(): - db = pymysql.connect(c.get('db', 'host'), c.get('db', 'username'), c.get('db', 'password'), c.get('db', 'name'), cursorclass=pymysql.cursors.DictCursor) + db = pymysql.connect(host=c.get('db', 'host'), user=c.get('db', 'username'), password=c.get('db', 'password'), database=c.get('db', 'name'), charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor) return db def closeConnection(db): |