未在Mysql中创建触发器 [英] Trigger not created in Mysql

查看:87
本文介绍了未在Mysql中创建触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在cpanel和DB中创建了一个用户,并给该用户ALLPRIVILEGES,并尝试导入sql dump,结果为"TRIGGER command denied to user 'test'@'localhost' for table 'tablename'".但这在我的本地环境中有效.在此过程中我做错了什么?请帮助我.

I have created one user in cpanel and DB and gave ALLPRIVILEGES to that user and tried to import sql dump which results "TRIGGER command denied to user 'test'@'localhost' for table 'tablename'" .But it works in my local.What i done wrong on this process? .kindly help me.

推荐答案

错误表明用户'test'@'localhost'缺少TRIGGER特权.使用"SHOW GRANTS"命令检查授予的特权,它将显示当前用户的特权.

Error says that user 'test'@'localhost' misses TRIGGER privilege. Check granted privileges with 'SHOW GRANTS' command, it will show privileges for current user.

要在全局级别授予此特权,请执行以下语句-

To grant this privilege at global level execute this statement -

GRANT Trigger ON *.* TO 'test'@'localhost'

或在对象级别(对于指定表)-

or at object level (for specified table) -

GRANT Trigger ON TABLE database_name.tablename TO 'test'@'localhost'

这篇关于未在Mysql中创建触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆