Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit b5c2e29

Browse files
author
Rebecca Graber
authored
feat: try hitting mysql twice to account for restart (#911)
1 parent 92b3c01 commit b5c2e29

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

provision.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,14 @@ done
139139
# In the event of a fresh MySQL container, wait a few seconds for the server to restart
140140
# See https://github.com/docker-library/mysql/issues/245 for why this is necessary.
141141
sleep 10
142+
143+
echo "${GREEN}Waiting for MySQL 5.7 to restart.${NC}"
144+
until docker-compose exec -T mysql57 bash -e -c "mysql -uroot -se \"SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = 'root')\"" &> /dev/null
145+
do
146+
printf "."
147+
sleep 1
148+
done
149+
142150
echo -e "${GREEN}MySQL ready.${NC}"
143151

144152

0 commit comments

Comments
 (0)