summaryrefslogtreecommitdiffstats
path: root/config-db/OpenSLX/MetaDB/mysql.pm
diff options
context:
space:
mode:
Diffstat (limited to 'config-db/OpenSLX/MetaDB/mysql.pm')
-rw-r--r--config-db/OpenSLX/MetaDB/mysql.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/config-db/OpenSLX/MetaDB/mysql.pm b/config-db/OpenSLX/MetaDB/mysql.pm
index 0b6569dd..82487191 100644
--- a/config-db/OpenSLX/MetaDB/mysql.pm
+++ b/config-db/OpenSLX/MetaDB/mysql.pm
@@ -56,7 +56,10 @@ sub connect ## no critic (ProhibitBuiltinHomonyms)
vlog(1, "trying to connect user '$dbUser' to mysql-database '$dbSpec'");
$self->{'dbh'} = DBI->connect(
- "dbi:mysql:$dbSpec", $dbUser, $dbPasswd, {PrintError => 0}
+ "dbi:mysql:$dbSpec", $dbUser, $dbPasswd, {
+ PrintError => 0,
+ mysql_auto_reconnect => 1,
+ }
) or die _tr("Cannot connect to database '%s' (%s)", $dbSpec, $DBI::errstr);
return 1;
}