wait and mysqlcheck