mysql触发器不起作用_mysql – 授予模式触发器不起作用

MySQL Docs起

In MySQL 5.0 CREATE TRIGGER requires the SUPER privilege.

因此,您需要为用户提供SUPER权限.导入时,会出现像“创建触发器…”这样的命令,这会导致错误.

检查您的MySQL版本和定义器值以及导入文件中的触发器.

编辑:

对于版本5.1,请遵循MySQL docs,其中说:

CREATE TRIGGER requires the TRIGGER privilege for the table associated with the

trigger. The statement might also require the SUPER privilege, depending on

the DEFINER value, as described later in this section. If binary logging is

enabled, CREATE TRIGGER might require the SUPER privilege, as described in

Section 19.7, “Binary Logging of Stored Programs”. (Before MySQL 5.1.6, there is

no TRIGGER privilege and this statement requires the SUPER privilege in all cases)

The DEFINER clause determines the security context to be used when checking access

privileges at trigger activation time.

因此,您需要检查Definer值以导入触发器.它可能有类似的东西:DEFINER = root.尝试删除定义器然后尝试导入.希望它有效……

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值