diff --git a/tests/integration/compose/docker_compose_mysql.yml b/tests/integration/compose/docker_compose_mysql.yml index 103fe2769e9..69f7f02fb4d 100644 --- a/tests/integration/compose/docker_compose_mysql.yml +++ b/tests/integration/compose/docker_compose_mysql.yml @@ -22,3 +22,4 @@ services: - type: ${MYSQL_LOGS_FS:-tmpfs} source: ${MYSQL_LOGS:-} target: /mysql/ + user: ${MYSQL_DOCKER_USER} diff --git a/tests/integration/compose/docker_compose_mysql_8_0.yml b/tests/integration/compose/docker_compose_mysql_8_0.yml index 9c9c7430cec..1e0ded6c6bd 100644 --- a/tests/integration/compose/docker_compose_mysql_8_0.yml +++ b/tests/integration/compose/docker_compose_mysql_8_0.yml @@ -21,3 +21,4 @@ services: - type: ${MYSQL8_LOGS_FS:-tmpfs} source: ${MYSQL8_LOGS:-} target: /mysql/ + user: ${MYSQL8_DOCKER_USER} diff --git a/tests/integration/compose/docker_compose_mysql_cluster.yml b/tests/integration/compose/docker_compose_mysql_cluster.yml index 079c451b9d6..3f7d21b733f 100644 --- a/tests/integration/compose/docker_compose_mysql_cluster.yml +++ b/tests/integration/compose/docker_compose_mysql_cluster.yml @@ -22,6 +22,7 @@ services: - type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs} source: ${MYSQL_CLUSTER_LOGS:-} target: /mysql/ + user: ${MYSQL_CLUSTER_DOCKER_USER} mysql3: image: mysql:8.0 restart: always @@ -44,6 +45,7 @@ services: - type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs} source: ${MYSQL_CLUSTER_LOGS:-} target: /mysql/ + user: ${MYSQL_CLUSTER_DOCKER_USER} mysql4: image: mysql:8.0 restart: always @@ -66,3 +68,4 @@ services: - type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs} source: ${MYSQL_CLUSTER_LOGS:-} target: /mysql/ + user: ${MYSQL_CLUSTER_DOCKER_USER} diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index b3088ba7c81..1ed8905389d 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -1047,6 +1047,8 @@ class ClickHouseCluster: env_variables["MYSQL_ROOT_HOST"] = "%" env_variables["MYSQL_LOGS"] = self.mysql57_logs_dir env_variables["MYSQL_LOGS_FS"] = "bind" + env_variables["MYSQL_DOCKER_USER"] = str(os.getuid()) + self.base_cmd.extend( ["--file", p.join(docker_compose_yml_dir, "docker_compose_mysql.yml")] ) @@ -1069,6 +1071,8 @@ class ClickHouseCluster: env_variables["MYSQL8_ROOT_HOST"] = "%" env_variables["MYSQL8_LOGS"] = self.mysql8_logs_dir env_variables["MYSQL8_LOGS_FS"] = "bind" + env_variables["MYSQL8_DOCKER_USER"] = str(os.getuid()) + self.base_cmd.extend( ["--file", p.join(docker_compose_yml_dir, "docker_compose_mysql_8_0.yml")] ) @@ -1090,6 +1094,7 @@ class ClickHouseCluster: env_variables["MYSQL_CLUSTER_ROOT_HOST"] = "%" env_variables["MYSQL_CLUSTER_LOGS"] = self.mysql_cluster_logs_dir env_variables["MYSQL_CLUSTER_LOGS_FS"] = "bind" + env_variables["MYSQL_CLUSTER_DOCKER_USER"] = str(os.getuid()) self.base_cmd.extend( [