In MySQL 5.5: can I capture the output of SHOW ERRORS? Is it possible to capture the messages that can be listed with SHOW ERRORS and store them in a log table? Like, is there a table somewhere, that I can select from?
Use

SELECT * 
FROM sys.statements_with_errors_or_warnings 
WHERE last_seen &gt; NOW() - INTERVAL ??? MINUTE;


Set a reasonable time limit.

Or query to performance_schema, tables events_statements_current, events_statements_history and events_statements_history_long.