From 30de2a2e12e33bfddaebe25b3469324a40b9cdda Mon Sep 17 00:00:00 2001 From: Jonathan Golder Date: Mon, 21 Aug 2017 13:55:33 +0200 Subject: [PATCH] Replace oursql with PyMySQL Since this is prefered on toolsforge and works out of the box after installing via pip, replace oursql which caused some problems. Especially oursql was not able to connect to db via ssh tunnel. Related Task: [FS#144](https://fs.golderweb.de/index.php?do=details&task_id=144) --- lib/mysqlred.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mysqlred.py b/lib/mysqlred.py index 1760fda..19b77e2 100644 --- a/lib/mysqlred.py +++ b/lib/mysqlred.py @@ -46,12 +46,13 @@ import sqlalchemy.types as types Base = declarative_base() -url = URL( "mysql+oursql", +url = URL( "mysql+pymysql", username=config.db_username, password=config.db_password, host=config.db_hostname, port=config.db_port, database=config.db_username + jogobot.config['db_suffix'] ) + engine = create_engine(url, echo=True)