首页 / 服务中心 / 常见问题

触发器不能创建,报错You do not have the SUPER privilege and binary logging is enabled....的解决方法

时间:2017-07-19 14:20:42 点击:

 在控制面板-字段修改日志中设置好了字段修改记录日志,但数据库中触发器没有创建成功,查看系统日志提示

You do not have the SUPER privilege and binary logging is enabled (you *might* want to to use the less safe log_bin_trust_function_creators variable)

经查询,是log_bin_trust_function_creators值为off导致,因为Table中有Trigger,如果不创建Trigger,不会出现这样的错误信息,但Trigger必须创建,在网络查询解决方案,是如下的办法: 

 使用设置命令: 

1

set global log_bin_trust_function_creators=1;

 但由于没有Super权限而无法完成。

永久解决方案如下:

1 linux系统, 在/etc/my.cnf 文件中,[mysqld]部分加上:

2 windows系统,在my.ini文件中,[mysqld]部分加上:

log_bin_trust_function_creators=1

就可以创建Trigger了