bash检查MySQL是否连接成功
直接上代码:
until mysql -h"127.0.0.1" -u"root" -p"123456" -P"3306" -e ";"; do &2 echo "MySQL is unavailable - sleeping" sleep 1 done &2 echo "MySQL is up - executing command"
上一篇: Flutter自动换行和两列布局
直接上代码:
until mysql -h"127.0.0.1" -u"root" -p"123456" -P"3306" -e ";"; do &2 echo "MySQL is unavailable - sleeping" sleep 1 done &2 echo "MySQL is up - executing command"