Make waiting for mysql to be up more reliable