diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/MySQLExternalDB.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/MySQLExternalDB.java index 1a42f1fd274c..5bf9cd741dea 100644 --- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/MySQLExternalDB.java +++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/MySQLExternalDB.java @@ -42,7 +42,7 @@ public String getJdbcDriver() { return "com.mysql.jdbc.Driver"; } - public String getDockerImageName() { return "mysql:5.7.37"; } + public String getDockerImageName() { return "mysql:8.4.3"; } public String[] getDockerAdditionalArgs() { return new String[] {"-p", "3306:3306", @@ -53,7 +53,7 @@ public String[] getDockerAdditionalArgs() { } public boolean isContainerReady(ProcessResults pr) { - Pattern pat = Pattern.compile("ready for connections"); + Pattern pat = Pattern.compile("mysqld.*ready for connections.*port.*3306"); Matcher m = pat.matcher(pr.stderr); return m.find() && m.find(); } diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mysql.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mysql.java index 7b6abc4dc339..b07b7cfa5257 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mysql.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/Mysql.java @@ -27,7 +27,7 @@ public class Mysql extends DatabaseRule { @Override public String getDockerImageName() { - return "mysql:5.7.37"; + return "mysql:8.4.3"; } @Override @@ -67,7 +67,7 @@ public String getInitialJdbcUrl(String hostAddress) { @Override public boolean isContainerReady(ProcessResults pr) { - Pattern pat = Pattern.compile("ready for connections"); + Pattern pat = Pattern.compile("mysqld.*ready for connections.*port.*3306"); Matcher m = pat.matcher(pr.stderr); return m.find() && m.find(); }