From 2a85164e4928a86592d72283114a36b3407add8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 27 May 2026 22:36:57 +0200 Subject: [PATCH] Use cheaper auth plugin and skip binlog for test MySQL containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch the dockerized MySQL container to mysql_native_password (single challenge-response) instead of the default caching_sha2_password (extra RSA key exchange round-trip on non-TLS connections). Also disable binary logging since tests don't need replication. Both reduce per-connection overhead. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- packages/backend-test-utils/src/database/mysql.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend-test-utils/src/database/mysql.ts b/packages/backend-test-utils/src/database/mysql.ts index b3098a58b0..4e4396adb9 100644 --- a/packages/backend-test-utils/src/database/mysql.ts +++ b/packages/backend-test-utils/src/database/mysql.ts @@ -56,6 +56,10 @@ export async function startMysqlContainer(image: string): Promise<{ .withExposedPorts(3306) .withEnvironment({ MYSQL_ROOT_PASSWORD: password }) .withTmpFs({ '/var/lib/mysql': 'rw' }) + .withCommand([ + '--default-authentication-plugin=mysql_native_password', + '--skip-log-bin', + ]) .start(); const host = container.getHost();