proper error handling for check_mysql