October 30th, 2021
Sometimes when reindexing or recompiling, I was getting the following error:
SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable), query was: CREATE TRIGGER trg_catalog_category_product_after_insert AFTER INSERT ON catalog_category_product FOR EACH ROW BEGIN INSERT IGNORE INTO `catalogrule_product_cl` (`entity_id`) VALUES (NEW.`product_id`); END
The solution was quite simple, login as the root user or a user with the SUPER privilege and run the following command:
SET GLOBAL log_bin_trust_function_creators = 1;
After that, you should be able to rerun your DI compile or whatever command was creating that error.