summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2017-07-19 17:54:29 +0200
committerSimon Rettberg2017-07-19 17:54:29 +0200
commit33cbfa2e47e5bb009a424a35da5b25f0df90b98c (patch)
treead6021726b588b860267024839430662f0b81994
parentMerge branch 'master' of dnbd3:bwlp/masterserver (diff)
downloadmasterserver-33cbfa2e47e5bb009a424a35da5b25f0df90b98c.tar.gz
masterserver-33cbfa2e47e5bb009a424a35da5b25f0df90b98c.tar.xz
masterserver-33cbfa2e47e5bb009a424a35da5b25f0df90b98c.zip
Fix mysql connector after lib upgrade
-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 765f782..cdc6fb5 100644
--- a/src/main/java/org/openslx/imagemaster/db/Database.java
+++ b/src/main/java/org/openslx/imagemaster/db/Database.java
@@ -75,7 +75,7 @@ public class Database
Util.notNullFatal( password, "password not set in mysql properties" );
try {
- Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
+ Class.forName( "com.mysql.cj.jdbc.Driver" ).newInstance();
} catch ( InstantiationException | IllegalAccessException | ClassNotFoundException e ) {
LOGGER.fatal( "Cannot get mysql JDBC driver!", e );
System.exit( 1 );
@@ -112,7 +112,7 @@ public class Database
try {
// Create fresh connection
String uri = "jdbc:mysql://" + host + "/" + dbname
- + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8"
+ + "?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC"
+ "&characterSetResults=utf8&connectionCollation=utf8mb4_unicode_ci";
Connection rawConnection = DriverManager.getConnection( uri,
user, password );