mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-02-02 21:11:45 +01:00
Added MySQL connection flags option "flags" in configuration.txt
This commit is contained in:
parent
2e0a832df3
commit
36e5b7e391
@ -35,6 +35,7 @@ public class MySQLMapStorage extends MapStorage {
|
|||||||
private String database;
|
private String database;
|
||||||
private String hostname;
|
private String hostname;
|
||||||
private String prefix = "";
|
private String prefix = "";
|
||||||
|
private String flags;
|
||||||
private String tableTiles;
|
private String tableTiles;
|
||||||
private String tableMaps;
|
private String tableMaps;
|
||||||
private String tableFaces;
|
private String tableFaces;
|
||||||
@ -278,6 +279,7 @@ public class MySQLMapStorage extends MapStorage {
|
|||||||
userid = core.configuration.getString("storage/userid", "dynmap");
|
userid = core.configuration.getString("storage/userid", "dynmap");
|
||||||
password = core.configuration.getString("storage/password", "dynmap");
|
password = core.configuration.getString("storage/password", "dynmap");
|
||||||
prefix = core.configuration.getString("storage/prefix", "");
|
prefix = core.configuration.getString("storage/prefix", "");
|
||||||
|
flags = core.configuration.getString("storage/flags", "?allowReconnect=true");
|
||||||
tableTiles = prefix + "Tiles";
|
tableTiles = prefix + "Tiles";
|
||||||
tableMaps = prefix + "Maps";
|
tableMaps = prefix + "Maps";
|
||||||
tableFaces = prefix + "Faces";
|
tableFaces = prefix + "Faces";
|
||||||
@ -286,7 +288,7 @@ public class MySQLMapStorage extends MapStorage {
|
|||||||
tableStandaloneFiles = prefix + "StandaloneFiles";
|
tableStandaloneFiles = prefix + "StandaloneFiles";
|
||||||
tableSchemaVersion = prefix + "SchemaVersion";
|
tableSchemaVersion = prefix + "SchemaVersion";
|
||||||
|
|
||||||
connectionString = "jdbc:mysql://" + hostname + ":" + port + "/" + database + "?allowReconnect=true";
|
connectionString = "jdbc:mysql://" + hostname + ":" + port + "/" + database + flags;
|
||||||
Log.info("Opening MySQL database " + hostname + ":" + port + "/" + database + " as map store");
|
Log.info("Opening MySQL database " + hostname + ":" + port + "/" + database + " as map store");
|
||||||
try {
|
try {
|
||||||
Class.forName("com.mysql.jdbc.Driver");
|
Class.forName("com.mysql.jdbc.Driver");
|
||||||
|
@ -25,7 +25,7 @@ storage:
|
|||||||
# SQLite db for map storage (uses dbfile as storage location)
|
# SQLite db for map storage (uses dbfile as storage location)
|
||||||
#type: sqlite
|
#type: sqlite
|
||||||
#dbfile: dynmap.db
|
#dbfile: dynmap.db
|
||||||
# MySQL DB for map storage (at 'hostname':'port' in database 'database' using user 'userid' password 'password' and table prefix 'prefix'
|
# MySQL DB for map storage (at 'hostname':'port' with flags "flags" in database 'database' using user 'userid' password 'password' and table prefix 'prefix')
|
||||||
#type: mysql
|
#type: mysql
|
||||||
#hostname: localhost
|
#hostname: localhost
|
||||||
#port: 3306
|
#port: 3306
|
||||||
@ -33,6 +33,7 @@ storage:
|
|||||||
#userid: dynmap
|
#userid: dynmap
|
||||||
#password: dynmap
|
#password: dynmap
|
||||||
#prefix: ""
|
#prefix: ""
|
||||||
|
#flags: "?allowReconnect=true"
|
||||||
|
|
||||||
components:
|
components:
|
||||||
- class: org.dynmap.ClientConfigurationComponent
|
- class: org.dynmap.ClientConfigurationComponent
|
||||||
|
Loading…
Reference in New Issue
Block a user