From fccef4c776d6ef261d307aacd33c3ef6348d98c3 Mon Sep 17 00:00:00 2001 From: Thomas Bach <63091663+thomasbach-dev@users.noreply.github.com> Date: Fri, 28 Feb 2025 18:05:30 +0100 Subject: [PATCH] configure host to be localhost in healthchecks Not sure, what the exact condition is that this occurs, but on my system I get ERROR 1045 (28000): Access denied for user 'healthcheck'@'172.17...' (using password: YES) The healthcheck user is granted access only from localhost. So we should ensure that the host we query is indeed localhost. --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1cab70d2..97718cd3 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -359,7 +359,7 @@ create_healthcheck_users() { local maskPreserve maskPreserve=$(umask -p) umask 0077 - echo -e "[mariadb-client]\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf + echo -e "[mariadb-client]\\nhost=localhost\\nport=$PORT\\nsocket=$SOCKET\\nuser=healthcheck\\npassword=$healthCheckConnectPass\\n" > "$DATADIR"/.my-healthcheck.cnf $maskPreserve }