Merge pull request #1895 from BrainStone/master

using newer MySQL driver
This commit is contained in:
Jesse Boyd 2018-03-12 17:23:27 +11:00 committed by GitHub
commit 5921e1865b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,7 @@ public class MySQL extends Database {
} }
@Override @Override
public Connection forceConnection() throws SQLException, ClassNotFoundException { public Connection forceConnection() throws SQLException {
Class.forName("com.mysql.jdbc.Driver");
this.connection = this.connection =
DriverManager.getConnection("jdbc:mysql://" + this.hostname + ':' + this.port + '/' + this.database + "?" + StringMan.join(Storage.MySQL.PROPERTIES, "&"), this.user, this.password); DriverManager.getConnection("jdbc:mysql://" + this.hostname + ':' + this.port + '/' + this.database + "?" + StringMan.join(Storage.MySQL.PROPERTIES, "&"), this.user, this.password);
return this.connection; return this.connection;