diff --git a/src/main/java/de/epiceric/shopchest/sql/MySQL.java b/src/main/java/de/epiceric/shopchest/sql/MySQL.java index 4997eba..ea18702 100644 --- a/src/main/java/de/epiceric/shopchest/sql/MySQL.java +++ b/src/main/java/de/epiceric/shopchest/sql/MySQL.java @@ -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); } diff --git a/src/main/java/de/epiceric/shopchest/sql/SQLite.java b/src/main/java/de/epiceric/shopchest/sql/SQLite.java index e944003..91349f0 100644 --- a/src/main/java/de/epiceric/shopchest/sql/SQLite.java +++ b/src/main/java/de/epiceric/shopchest/sql/SQLite.java @@ -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); }