My new github repo, mysql-trigger-logger, demonstrates how to use MySQL triggers to log the timestamp, user, SQL and a note for unexpected database changes (“heisenbugs”) from UPDATE or INSERT statements to a logging table according to custom logic.
This is professional-grade code with documentation and tested notification scripts in Perl, Python and bash, and goes beyond what is available in StackOverflow answers.
github: mysql-trigger-logger