mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Added support for allowPublicKeyRetrieval=true in the JDBC launch (#4635)
options for MySQL Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
This commit is contained in:
parent
8e5251ba66
commit
280eb0ba51
@ -251,6 +251,7 @@ public class GeneralConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getMySQLMaxPoolSize(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxPoolSize." + StringUtils.getCapitalized(identifier.toString()), 10); }
|
public int getMySQLMaxPoolSize(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxPoolSize." + StringUtils.getCapitalized(identifier.toString()), 10); }
|
||||||
public boolean getMySQLSSL() { return config.getBoolean("MySQL.Server.SSL", true); }
|
public boolean getMySQLSSL() { return config.getBoolean("MySQL.Server.SSL", true); }
|
||||||
public boolean getMySQLDebug() { return config.getBoolean("MySQL.Debug", false); }
|
public boolean getMySQLDebug() { return config.getBoolean("MySQL.Debug", false); }
|
||||||
|
public boolean getMySQLPublicKeyRetrieval() { return config.getBoolean("MySQL.Server.allowPublicKeyRetrieval", true); }
|
||||||
|
|
||||||
private String getStringIncludingInts(String key) {
|
private String getStringIncludingInts(String key) {
|
||||||
String str = config.getString(key);
|
String str = config.getString(key);
|
||||||
|
@ -61,6 +61,11 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
connectionString+=
|
connectionString+=
|
||||||
"?useSSL=false";
|
"?useSSL=false";
|
||||||
|
|
||||||
|
if(mcMMO.p.getGeneralConfig().getMySQLPublicKeyRetrieval()) {
|
||||||
|
connectionString+=
|
||||||
|
"&allowPublicKeyRetrieval=true";
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Force driver to load if not yet loaded
|
// Force driver to load if not yet loaded
|
||||||
Class.forName(driverPath);
|
Class.forName(driverPath);
|
||||||
|
@ -202,6 +202,7 @@ MySQL:
|
|||||||
SSL: true
|
SSL: true
|
||||||
Port: 3306
|
Port: 3306
|
||||||
Address: localhost
|
Address: localhost
|
||||||
|
allowPublicKeyRetrieval: true
|
||||||
|
|
||||||
#
|
#
|
||||||
# Settings for Hardcore mode
|
# Settings for Hardcore mode
|
||||||
|
Loading…
Reference in New Issue
Block a user