Commit 18f4764c authored by Johannes Schwab's avatar Johannes Schwab

server: auto reconnect to mysql server

parent 907c2d3c
......@@ -28,6 +28,7 @@
QSqlDatabase SqlBackend::addDatabase(const QString &connectionName) {
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL", connectionName);
db.setConnectOptions("MYSQL_OPT_RECONNECT=1");
db.setDatabaseName(conf.database);
db.setUserName(conf.user);
db.setPassword(conf.password);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment