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)
This commit is contained in:
@@ -46,12 +46,13 @@ import sqlalchemy.types as types
|
|||||||
|
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
url = URL( "mysql+oursql",
|
url = URL( "mysql+pymysql",
|
||||||
username=config.db_username,
|
username=config.db_username,
|
||||||
password=config.db_password,
|
password=config.db_password,
|
||||||
host=config.db_hostname,
|
host=config.db_hostname,
|
||||||
port=config.db_port,
|
port=config.db_port,
|
||||||
database=config.db_username + jogobot.config['db_suffix'] )
|
database=config.db_username + jogobot.config['db_suffix'] )
|
||||||
|
|
||||||
engine = create_engine(url, echo=True)
|
engine = create_engine(url, echo=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user