diff options
author | Simon Westphahl <simon.westphahl@bmw.de> | 2023-02-21 13:55:06 +0100 |
---|---|---|
committer | Simon Westphahl <simon.westphahl@bmw.de> | 2023-02-21 13:55:06 +0100 |
commit | f653eecb97edfcb78ba8951eaa9576141ddc452e (patch) | |
tree | e971c0e833a117673c5fa5d0b665e34d963cc5aa | |
parent | d57942a41b9077152b29e0f40f30e904a62a8fbc (diff) | |
download | zuul-f653eecb97edfcb78ba8951eaa9576141ddc452e.tar.gz |
Fix user creation in Docker test setup script
MySQL 8 no longer supports implicitly creating a user using the GRANT
statement. Use a separate CREATE USER statement instead.
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'identified by 'openstack_citest' WITH GRANT
OPTION' at line 1
Change-Id: I4cab4c1855d1ba97cbfc9dd0835b3d302d73aa62
-rwxr-xr-x | tools/test-setup-docker.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/test-setup-docker.sh b/tools/test-setup-docker.sh index a0fcf9f5a..1601b11a7 100755 --- a/tools/test-setup-docker.sh +++ b/tools/test-setup-docker.sh @@ -58,7 +58,8 @@ timeout 30 bash -c "until ${ROOTCMD} ${MYSQL} -e 'show databases'; do sleep 0.5; echo echo "Setting up permissions for zuul tests" -${ROOTCMD} ${MYSQL} -e "GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest'@'%' identified by 'openstack_citest' WITH GRANT OPTION;" +${ROOTCMD} ${MYSQL} -e "CREATE USER 'openstack_citest'@'%' identified by 'openstack_citest';" +${ROOTCMD} ${MYSQL} -e "GRANT ALL PRIVILEGES ON *.* TO 'openstack_citest'@'%' WITH GRANT OPTION;" ${ROOTCMD} ${MYSQL} -u openstack_citest -popenstack_citest -e "SET default_storage_engine=MYISAM; DROP DATABASE IF EXISTS openstack_citest; CREATE DATABASE openstack_citest CHARACTER SET utf8;" echo "Finished" |