From b0429dc28620ea34763d48c5608d90dce6cd1efa Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 18 Oct 2022 16:59:51 +0200 Subject: [server] Use mariadb class name --- .../src/main/java/org/openslx/bwlp/sat/database/Database.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dozentenmodulserver') diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/Database.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/Database.java index a4a783dd..17d7a6c7 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/Database.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/Database.java @@ -30,7 +30,7 @@ public class Database { static { try { // Hack for some Java versions to register and instantiate the MySQL connection driver - Class.forName("com.mysql.cj.jdbc.Driver").newInstance(); + Class.forName("org.mariadb.jdbc.Driver").newInstance(); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { LOGGER.fatal("Cannot get mysql JDBC driver!", e); System.exit(1); @@ -65,7 +65,7 @@ public class Database { } try { // Create fresh connection - Connection rawConnection = DriverManager.getConnection(Configuration.getDbUri(), + Connection rawConnection = DriverManager.getConnection(Configuration.getDbUri() + "&permitMysqlScheme", Configuration.getDbUsername(), Configuration.getDbPassword()); // By convention in our program we don't want auto commit rawConnection.setAutoCommit(false); -- cgit v1.2.3-55-g7522