mysql:不能在系统表上创建触发器吗? [英] mysql: Cant we create triggers on system tables?

查看:595
本文介绍了mysql:不能在系统表上创建触发器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过在其上编写触发器来审核mysql.user表中的特权更改.

I am trying to audit the privilege changes in mysql.user table by writing a trigger on it.

insert trigger: will capture who gave the new permissions and when
update trigger: will capture who changes the privileges from what[old privilege]
remove trigger: will capture who removed the privileges and what are they

现在,我在写类似文字时遇到错误

Now, I am getting an error while writing like

ERROR 1465 (HY000): Triggers can not be created on system tables

我们可以在系统表上创建触发器吗,有什么解决方法,或者更高版本将支持该触发器[> 5.1.61]?

Can we create a trigger on system tables, Is there any work around or it will be supported in higher versions[> 5.1.61] ?

提前谢谢.

推荐答案

不,我们不能.即使我们最关心的特权是allsuper

No we can not. Even if we have the best concerned privileges are all and super

请参阅mySql提供的(所有)和(超级)特权

尝试了所有类型的特权后

After trying all type of privileges like

grant super on *.* to root@localhost
grant all on *.* to root@localhost

我在不同的表mysql.db上尝试了最简单的触发器,并得到了相同的错误

I have tried simplest trigger on different tables mysql.db and got same error

无法在系统表上创建触发器//请接受 痛苦的真相

Triggers can not be created on system tables // Please accept this bitter truth

如果您发现可以在系统表上创建触发器的任何地方,那简直是错误的

If you found anywhere that triggers can be created on system tables, simply that is wrong

这篇关于mysql:不能在系统表上创建触发器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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