diff --git a/src/main/java/net/coreprotect/config/ConfigHandler.java b/src/main/java/net/coreprotect/config/ConfigHandler.java index 73d1425..abaed07 100644 --- a/src/main/java/net/coreprotect/config/ConfigHandler.java +++ b/src/main/java/net/coreprotect/config/ConfigHandler.java @@ -210,6 +210,14 @@ public class ConfigHandler extends Queue { } else { HikariConfig config = new HikariConfig(); + try { + Class.forName("com.mysql.cj.jdbc.Driver"); + config.setDriverClassName("com.mysql.cj.jdbc.Driver"); + } + catch (Exception e) { + config.setDriverClassName("com.mysql.jdbc.Driver"); + } + config.setJdbcUrl("jdbc:mysql://" + ConfigHandler.host + ":" + ConfigHandler.port + "/" + ConfigHandler.database); config.setUsername(ConfigHandler.username); config.setPassword(ConfigHandler.password);