From e6b77bcad6a86eb8a99e7a066c96d527fbe22cc9 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 2 Oct 2024 00:05:35 +0200 Subject: [PATCH] Updated JDBC connection string for Database connection - Updated SSL setting - Due to a weard bug with MySQL in Docker in WSL (Windows), added allowPublicKeyRetrieval=true --- .../fr/pandacube/lib/core/mc_version/mcversion.json | 6 ++++-- .../src/main/java/fr/pandacube/lib/db/DBConnection.java | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pandalib-core/src/main/resources/fr/pandacube/lib/core/mc_version/mcversion.json b/pandalib-core/src/main/resources/fr/pandacube/lib/core/mc_version/mcversion.json index 817d332..f932771 100644 --- a/pandalib-core/src/main/resources/fr/pandacube/lib/core/mc_version/mcversion.json +++ b/pandalib-core/src/main/resources/fr/pandacube/lib/core/mc_version/mcversion.json @@ -67,7 +67,8 @@ "1.20.4": 765, "1.20.5": 766, "1.20.6": 766, - "1.21": 767 + "1.21": 767, + "1.21.1": 767 }, "versionsOfProtocol": { "4": [ @@ -220,7 +221,8 @@ "1.20.6" ], "767": [ - "1.21" + "1.21", + "1.21.1" ] } } \ No newline at end of file diff --git a/pandalib-db/src/main/java/fr/pandacube/lib/db/DBConnection.java b/pandalib-db/src/main/java/fr/pandacube/lib/db/DBConnection.java index 4a24aae..46079a9 100644 --- a/pandalib-db/src/main/java/fr/pandacube/lib/db/DBConnection.java +++ b/pandalib-db/src/main/java/fr/pandacube/lib/db/DBConnection.java @@ -23,7 +23,8 @@ public class DBConnection { public DBConnection(String host, int port, String dbname, String login, String password) { this("jdbc:mysql://" + host + ":" + port + "/" + dbname + "?useUnicode=true" - + "&useSSL=false" + + "&sslMode=DISABLED" + + "&allowPublicKeyRetrieval=true" + "&characterEncoding=utf8" + "&characterSetResults=utf8" + "&character_set_server=utf8mb4"