Files
datastore/tests/integration/compose/docker_compose_mysql_cluster.yml
Alexey MilovidovandClaude Opus 4.6 23d9de6f6f Fix MySQL cluster containers auth failure and revert unrelated changes
The cluster containers (mysql2, mysql3, mysql4) use `caching_sha2_password`
as the default auth plugin (they don't have
`--default_authentication_plugin='mysql_native_password'`). When RSA key
auto-generation was disabled without providing pre-generated keys, the
`caching_sha2_password` plugin could not authenticate, causing "Access
denied" for all connections.

Fix: mount the pre-generated RSA keys in the cluster containers and
configure the key paths, same as the mysql80 container.

Also revert unrelated changes that were accidentally included in the
initial commit (log_parser.py regression, .claude/ files, docs).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-07 01:54:15 +01:00

98 lines
4.0 KiB
YAML

services:
mysql2:
image: mysql:8.0
stop_grace_period: 5s
restart: always
environment:
MYSQL_ROOT_PASSWORD: ClickHouse_MySQL_P@ssw0rd
MYSQL_ROOT_HOST: ${MYSQL_CLUSTER_ROOT_HOST}
DATADIR: /mysql/
expose:
- ${MYSQL_CLUSTER_PORT:-3306}
command: --server_id=100
--log-bin='mysql-bin-2.log'
--default-time-zone='+3:00'
--gtid-mode="ON"
--enforce-gtid-consistency
--log-error-verbosity=3
--log-error=/mysql/2_error.log
--general-log=ON
--general-log-file=/mysql/2_general.log
--sha256_password_auto_generate_rsa_keys=OFF
--caching_sha2_password_auto_generate_rsa_keys=OFF
--sha256_password_private_key_path=/etc/mysql/certs/private_key.pem
--sha256_password_public_key_path=/etc/mysql/certs/public_key.pem
--caching_sha2_password_private_key_path=/etc/mysql/certs/private_key.pem
--caching_sha2_password_public_key_path=/etc/mysql/certs/public_key.pem
volumes:
- type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs}
source: ${MYSQL_CLUSTER_LOGS:-}
target: /mysql/
- ../helpers/mysql_cert:/etc/mysql/certs
user: ${MYSQL_CLUSTER_DOCKER_USER}
cpus: 3
mysql3:
image: mysql:8.0
stop_grace_period: 5s
restart: always
environment:
MYSQL_ROOT_PASSWORD: ClickHouse_MySQL_P@ssw0rd
MYSQL_ROOT_HOST: ${MYSQL_CLUSTER_ROOT_HOST}
DATADIR: /mysql/
expose:
- ${MYSQL_CLUSTER_PORT:-3306}
command: --server_id=100
--log-bin='mysql-bin-3.log'
--default-time-zone='+3:00'
--gtid-mode="ON"
--enforce-gtid-consistency
--log-error-verbosity=3
--log-error=/mysql/3_error.log
--general-log=ON
--general-log-file=/mysql/3_general.log
--sha256_password_auto_generate_rsa_keys=OFF
--caching_sha2_password_auto_generate_rsa_keys=OFF
--sha256_password_private_key_path=/etc/mysql/certs/private_key.pem
--sha256_password_public_key_path=/etc/mysql/certs/public_key.pem
--caching_sha2_password_private_key_path=/etc/mysql/certs/private_key.pem
--caching_sha2_password_public_key_path=/etc/mysql/certs/public_key.pem
volumes:
- type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs}
source: ${MYSQL_CLUSTER_LOGS:-}
target: /mysql/
- ../helpers/mysql_cert:/etc/mysql/certs
user: ${MYSQL_CLUSTER_DOCKER_USER}
cpus: 3
mysql4:
image: mysql:8.0
stop_grace_period: 5s
restart: always
environment:
MYSQL_ROOT_PASSWORD: ClickHouse_MySQL_P@ssw0rd
MYSQL_ROOT_HOST: ${MYSQL_CLUSTER_ROOT_HOST}
DATADIR: /mysql/
expose:
- ${MYSQL_CLUSTER_PORT:-3306}
command: --server_id=100
--log-bin='mysql-bin-4.log'
--default-time-zone='+3:00'
--gtid-mode="ON"
--enforce-gtid-consistency
--log-error-verbosity=3
--log-error=/mysql/4_error.log
--general-log=ON
--general-log-file=/mysql/4_general.log
--sha256_password_auto_generate_rsa_keys=OFF
--caching_sha2_password_auto_generate_rsa_keys=OFF
--sha256_password_private_key_path=/etc/mysql/certs/private_key.pem
--sha256_password_public_key_path=/etc/mysql/certs/public_key.pem
--caching_sha2_password_private_key_path=/etc/mysql/certs/private_key.pem
--caching_sha2_password_public_key_path=/etc/mysql/certs/public_key.pem
volumes:
- type: ${MYSQL_CLUSTER_LOGS_FS:-tmpfs}
source: ${MYSQL_CLUSTER_LOGS:-}
target: /mysql/
- ../helpers/mysql_cert:/etc/mysql/certs
user: ${MYSQL_CLUSTER_DOCKER_USER}
cpus: 3