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 {
|
try {
|
||||||
getLogger().info("Connecting to " + user + "@" + url + "...");
|
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);
|
pool = new MySQLConnectionPool(url, user, password, mysqlUseSSL, mysqlRequireSSL);
|
||||||
final Connection conn = getConnection(true);
|
final Connection conn = getConnection(true);
|
||||||
if (conn == null) {
|
if (conn == null) {
|
||||||
|
Reference in New Issue
Block a user