From c133daad2cb4cf1007d195a0b4648d2fc2a9dcfc Mon Sep 17 00:00:00 2001 From: John Nagro Date: Fri, 27 Oct 2023 18:07:58 +0000 Subject: [PATCH] fix: mysql8 provisioning scripts --- provision-enterprise-access.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/provision-enterprise-access.sh b/provision-enterprise-access.sh index f918771d..f5fc80e0 100644 --- a/provision-enterprise-access.sh +++ b/provision-enterprise-access.sh @@ -1,3 +1,7 @@ +set -euf -o pipefail + +. "$DEVSTACK_WORKSPACE/devstack/scripts/colors.sh" + name="enterprise_access" port="18270" @@ -8,7 +12,7 @@ docker-compose up -d --build # Wait for MySQL echo "Waiting for MySQL" -until docker exec -i enterprise_access.db mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null +until docker exec -i enterprise_access.mysql80 mysql -u root -se "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')" &> /dev/null do printf "." sleep 1 @@ -16,7 +20,7 @@ done sleep 5 # Create the database -docker exec -i enterprise_access.db mysql -u root -se "CREATE DATABASE enterprise_access;" +docker exec -i enterprise_access.mysql80 mysql -u root -se "CREATE DATABASE IF NOT EXISTS enterprise_access;" # Run migrations echo -e "${GREEN}Running migrations for ${name}...${NC}"