Skip to content

Instantly share code, notes, and snippets.

@olkeene
Created December 20, 2016 12:02
Show Gist options
  • Select an option

  • Save olkeene/53ee0f454ff11b5c82cab73d4e5ecfc6 to your computer and use it in GitHub Desktop.

Select an option

Save olkeene/53ee0f454ff11b5c82cab73d4e5ecfc6 to your computer and use it in GitHub Desktop.

Revisions

  1. olkeene created this gist Dec 20, 2016.
    10 changes: 10 additions & 0 deletions wait-for-mysql.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/bash

    echo "Waiting for mysql"

    until mysql -h"$MYSQL_HOST" -P3306 -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" -e 'show databases;'; do
    >&2 printf "."
    sleep 1
    done

    echo "Mysql ready"