diff --git a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java index c5bb13348..90f7d95ac 100644 --- a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java +++ b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/dbpool/MySqlDatabaseTestResource.java @@ -45,7 +45,7 @@ public Map start() { container.withEnv(DATABASE_PROPERTY, DEFAULT_SCHEMA); container.start(); - var jdbcUrl = "jdbc:mysql://localhost:%d/%s".formatted(container.getMappedPort(3306), DEFAULT_SCHEMA); + var jdbcUrl = "jdbc:mysql://%s:%d/%s".formatted(container.getHost(), container.getMappedPort(3306), DEFAULT_SCHEMA); Map config = new HashMap<>(); config.put(defaultDataSource(QUARKUS_DB_JDBC_URL), jdbcUrl); config.put(defaultDataSource(QUARKUS_DB_USER), USER);