I wrote some SQL procedures, which can create triggers. The main goal was to create triggers for `mysql` schema, but it is not possible for the following limitation of current version MySQL and MariaDB:
1465 HY000 ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA Triggers can not be created on system tables