Created
June 8, 2017 13:45
-
-
Save taosx/f8a9a8e8a1c9b47d12b0ab9e552a4a51 to your computer and use it in GitHub Desktop.
Wait for mysql connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://stackoverflow.com/a/37300565 | |
until nc -z -v -w30 $MYSQL_HOST 3306 | |
do | |
echo "Waiting for database connection..." | |
# wait for 5 seconds before check again | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment