mysql报错You do not have the SUPER privilege and binary logging is enabled

创建触发器,显示You do not have the SUPER privilege and binary logging is enabled

CREATE TRIGGER `delete_lottery_template` AFTER DELETE ON `lottery_info` FOR EACH ROW 
BEGIN
    DELETE FROM lottery_template WHERE lottery_template_id = old.lottery_template_id;
END;

解决方法:

用root用户登录:mysql -u root -p,之后

set global log_bin_trust_function_creators = 1;
 flush privileges;

mysql报错You do not have the SUPER privilege and binary logging is enabled_第1张图片

创建触发器成功

你可能感兴趣的:(工作问题总结,mysql,数据库)