mysql standard way to detect error Is there a standard way to detect errors when using mysql from cli in this way:

mysql --host=$db_host --user=$db_user --password=$db_password -v -v -v $database &lt; file.sql


What I mean is I want to know what I can search for in the output. For example a warning message always has Warning. Does error always have Error in the output?
Turn on sql_warnings, sql_note, log_warnings (or log_error_verbosity after 5.7.2), and lots of things in sql_mode.  See doc for explanations.