wait_mysql.sh 145 B

12345678
  1. #!/bin/sh
  2. while :
  3. do
  4. if mysql -e 'select version()' 2>&1 | grep 'version()\|ERROR 2059 (HY000):'; then
  5. break
  6. fi
  7. sleep 3
  8. done