mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01: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:
parent
1f2e6cd5f5
commit
4cfb7a5f4b
@ -15,9 +15,11 @@ Version 2.1.0
|
|||||||
+ Added links to mcMMO related websites to various commands
|
+ Added links to mcMMO related websites to various commands
|
||||||
+ Certain elements of mcMMO's UI have been restyled
|
+ Certain elements of mcMMO's UI have been restyled
|
||||||
+ Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out
|
+ Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out
|
||||||
|
+ (MySQL) Added support for SSL for MySQL/MariaDB (Off by default)
|
||||||
+ (Skills) Tool alerts now are sent to the Action Bar
|
+ (Skills) Tool alerts now are sent to the Action Bar
|
||||||
+ (Skills) Super Ability activation alerts are now sent to the Action Bar
|
+ (Skills) Super Ability activation alerts are now sent to the Action Bar
|
||||||
+ (Skills) Certain Skill messages are now sent to the Action Bar
|
+ (Skills) Certain Skill messages are now sent to the Action Bar
|
||||||
|
+ (Config) Added option to use SSL for MySQL in config.yml
|
||||||
+ (Config) Added option to disable the new URL links to config.yml
|
+ (Config) Added option to disable the new URL links to config.yml
|
||||||
+ (Config) New config file added coreskills.yml
|
+ (Config) New config file added coreskills.yml
|
||||||
+ (Config) Added rank settings for the new Woodcutting skill
|
+ (Config) Added rank settings for the new Woodcutting skill
|
||||||
|
@ -346,6 +346,7 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public String getMySQLUserPassword() { return getStringIncludingInts("MySQL.Database.User_Password"); }
|
public String getMySQLUserPassword() { return getStringIncludingInts("MySQL.Database.User_Password"); }
|
||||||
public int getMySQLMaxConnections(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxConnections." + StringUtils.getCapitalized(identifier.toString()), 30); }
|
public int getMySQLMaxConnections(PoolIdentifier identifier) { return config.getInt("MySQL.Database.MaxConnections." + StringUtils.getCapitalized(identifier.toString()), 30); }
|
||||||
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); }
|
||||||
|
|
||||||
private String getStringIncludingInts(String key) {
|
private String getStringIncludingInts(String key) {
|
||||||
String str = config.getString(key);
|
String str = config.getString(key);
|
||||||
|
@ -36,6 +36,13 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
|||||||
String connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName()
|
String connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName()
|
||||||
+ ":" + Config.getInstance().getMySQLServerPort() + "/" + Config.getInstance().getMySQLDatabaseName();
|
+ ":" + 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 {
|
try {
|
||||||
// Force driver to load if not yet loaded
|
// Force driver to load if not yet loaded
|
||||||
Class.forName("com.mysql.jdbc.Driver");
|
Class.forName("com.mysql.jdbc.Driver");
|
||||||
|
@ -166,7 +166,7 @@ MySQL:
|
|||||||
Load: 20
|
Load: 20
|
||||||
Save: 20
|
Save: 20
|
||||||
Server:
|
Server:
|
||||||
SSL: false
|
SSL: true
|
||||||
Port: 3306
|
Port: 3306
|
||||||
Address: localhost
|
Address: localhost
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user