SELECTTRIGGER_SCHEMA AS `Database`,TRIGGER_NAME AS `Trigger`,EVENT_OBJECT_TABLE AS `Table`,EVENT_MANIPULATION AS `Event`,ACTION_STATEMENT AS `Statement`
FROMinformation_schema.TRIGGERS;
创建触发器遇到报错:
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)
全局配置: 不是永久生效,需要永久生效要重启mysql
SET GLOBAL log_bin_trust_function_creators = 1;
永久配置
要永久设置该变量,需要修改MySQL配置文件(通常是my.cnf或my.ini),添加或修改以下行:log_bin_trust_function_creators = 1
查询
SHOW VARIABLES LIKE 'log_bin_trust_function_creators';