Specify database connection test queries

Should fix database connection error on older Minecraft versions
This commit is contained in:
Eric 2019-04-28 22:28:03 +02:00
parent 6962ad995e
commit 404c872396
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ public class MySQL extends Database {
Config.databaseMySqlHost, Config.databaseMySqlPort, Config.databaseMySqlDatabase));
config.setUsername(Config.databaseMySqlUsername);
config.setPassword(Config.databaseMySqlPassword);
config.setConnectionTestQuery("SELECT 1");
return new HikariDataSource(config);
}

View File

@ -35,6 +35,7 @@ public class SQLite extends Database {
HikariConfig config = new HikariConfig();
config.setJdbcUrl(String.format("jdbc:sqlite:" + dbFile));
config.setConnectionTestQuery("SELECT 1");
return new HikariDataSource(config);
}