Adds requested feature for #3432
This commit is contained in:
parent
8d423747c0
commit
f8475ed73c
1 changed files with 11 additions and 6 deletions
|
|
@ -293,13 +293,18 @@ public class MySQLMapStorage extends MapStorage {
|
||||||
connectionString = "jdbc:mysql://" + hostname + ":" + port + "/" + database + flags;
|
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.cj.jdbc.Driver");
|
||||||
// Initialize/update tables, if needed
|
} catch (ClassNotFoundException cnfxLatestDriver){
|
||||||
if(!initializeTables()) {
|
Log.warning("MySQL-JDBC Did not find 'com.mysql.cj.jdbc.Driver' trying 'com.mysql.jdbc.Driver' next");
|
||||||
|
try {
|
||||||
|
Class.forName("com.mysql.jdbc.Driver");
|
||||||
|
} catch (ClassNotFoundException cnfx) {
|
||||||
|
Log.severe("MySQL-JDBC classes not found - MySQL data source not usable");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (ClassNotFoundException cnfx) {
|
}
|
||||||
Log.severe("MySQL-JDBC classes not found - MySQL data source not usable");
|
// Initialize/update tables, if needed
|
||||||
|
if(!initializeTables()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return writeConfigPHP(core);
|
return writeConfigPHP(core);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue