mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
mcMMO now supports SSL and tries to use it by default for MySQL (turn this off in config.yml MySQL.Server.SSL)
this fixes a lot of console spam from default mysql installs
This commit is contained in:
@ -36,6 +36,13 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
String connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName()
|
||||
+ ":" + Config.getInstance().getMySQLServerPort() + "/" + Config.getInstance().getMySQLDatabaseName();
|
||||
|
||||
if(Config.getInstance().getMySQLSSL())
|
||||
connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName()
|
||||
+ ":" + Config.getInstance().getMySQLServerPort() + "/" + Config.getInstance().getMySQLDatabaseName() +
|
||||
"?verifyServerCertificate=false"+
|
||||
"&useSSL=true"+
|
||||
"&requireSSL=true";
|
||||
|
||||
try {
|
||||
// Force driver to load if not yet loaded
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
|
Reference in New Issue
Block a user