From 949c7dfd2e658e96fb1cddfbd6a760bfefb5e19a Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 21 Feb 2024 10:26:26 +1100 Subject: [PATCH] test: mysql-log-bin - add password MariaDB-11.4 added a default self-signed TLS cert. With this in the cases where there is no secure password there will be a TLS error. By setting the password, the connection can continue. Adding the password is compatible with MySQL and equivalents. --- test/tests/mysql-log-bin/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/tests/mysql-log-bin/run.sh b/test/tests/mysql-log-bin/run.sh index bf05945f4..6e01e095e 100755 --- a/test/tests/mysql-log-bin/run.sh +++ b/test/tests/mysql-log-bin/run.sh @@ -6,9 +6,10 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" image="$1" cname="mysql-container-$RANDOM-$RANDOM" +rootpass="secret$RANDOM-$RANDOM" cid="$( docker run -d \ - -e MYSQL_ALLOW_EMPTY_PASSWORD=1 \ + -e MYSQL_ROOT_PASSWORD="$rootpass" \ --name "$cname" \ "$image" \ --log-bin="foo-$RANDOM" \ @@ -23,6 +24,7 @@ mysql() { "$image" \ -euc 'if command -v mariadb > /dev/null; then exec mariadb "$@"; else exec mysql "$@"; fi' -- \ -uroot \ + -p"$rootpass" \ -hmysql \ --silent \ "$@"