Skip to content

Commit

Permalink
Load the new mysql driver class if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed Apr 13, 2021
1 parent c20b677 commit 0fd3266
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/de/diddiz/LogBlock/LogBlock.java
Expand Up @@ -73,7 +73,11 @@ public void onEnable() {
}
try {
getLogger().info("Connecting to " + user + "@" + url + "...");
Class.forName("com.mysql.jdbc.Driver");
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException ignored) {
Class.forName("com.mysql.jdbc.Driver");
}
pool = new MySQLConnectionPool(url, user, password, mysqlUseSSL, mysqlRequireSSL);
final Connection conn = getConnection(true);
if (conn == null) {
Expand Down

0 comments on commit 0fd3266

Please sign in to comment.