forked from LogBlock/LogBlock
Load the new mysql driver class if available
This commit is contained in:
@ -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