Load the new mysql driver class if available
This commit is contained in:
1 parent
c20b677507
commit
0fd3266c7b
1 file changed
+5
-1
@@ -73,7 +73,11 @@ public class LogBlock extends JavaPlugin {
|
||||
}
|
||||
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) {
|
||||
|
||||
Reference in new issue
Block a user