Help language development. Donate to The Perl Foundation

Magento cpan:SACOMO last updated on 2018-06-07

scripts/mysql-running-test
#!/bin/sh
# Wait until MySQL is really available
MAXCOUNTER=500;
COUNTER=1;
while ! mysql -h db -u"magento" -p"magento" -e "show databases;" > /dev/null 2>&1; do
    sleep 1
    COUNTER=`expr $COUNTER + 1`
    if [ $COUNTER -gt $MAXCOUNTER ]; then
        >&2 echo "We have been waiting for MySQL too long already; failing."
        exit 1
    fi;
done