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.
Thanks a lot, it solved my problem too.
This resolved my problem with a migration from mysql 5.7 to 8.0. A magento2 web store using the DB was showing this error/warning during upgrades. Ran your fix on MySQL selecting that DB in question and it solved the problem. Thanks!
Awesome, glad to hear it helped!