summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-10-18 17:09:40 +0200
committerSimon Rettberg2022-10-18 17:09:40 +0200
commit36247770c66f22f8cf748b32ee54a0605f0c4b2a (patch)
treee8f616f6b6de4f460629482fdd324c56367921ea
parentSwitch to mariadb to fix build (diff)
downloadmasterserver-36247770c66f22f8cf748b32ee54a0605f0c4b2a.tar.gz
masterserver-36247770c66f22f8cf748b32ee54a0605f0c4b2a.tar.xz
masterserver-36247770c66f22f8cf748b32ee54a0605f0c4b2a.zip
Use mariadb connector driver
-rw-r--r--src/main/java/org/openslx/imagemaster/db/Database.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/openslx/imagemaster/db/Database.java b/src/main/java/org/openslx/imagemaster/db/Database.java
index 0832649..80997ea 100644
--- a/src/main/java/org/openslx/imagemaster/db/Database.java
+++ b/src/main/java/org/openslx/imagemaster/db/Database.java
@@ -76,7 +76,7 @@ public class Database
Util.notNullFatal( password, "password not set in mysql properties" );
try {
- Class.forName( "com.mysql.cj.jdbc.Driver" ).newInstance();
+ Class.forName( "org.mariadb.jdbc.Driver" ).newInstance();
} catch ( Exception e1 ) {
LOGGER.fatal( "Cannot get mysql JDBC driver", e1 );
System.exit( 1 );
@@ -112,7 +112,7 @@ public class Database
}
try {
// Create fresh connection
- String uri = "jdbc:mysql://" + host + "/" + dbname
+ String uri = "jdbc:mariadb://" + host + "/" + dbname
+ "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC"
+ "&characterSetResults=utf8&connectionCollation=utf8mb4_unicode_ci";
Connection rawConnection = DriverManager.getConnection( uri,