2012-04-27 33 views
1

我想通过编写触发器来审计mysql.user表中的权限更改。mysql:我们不能在系统表上创建触发器吗?

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 

现在,我一边写像

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

,我们可以创建系统表的触发器得到一个错误,有没有什么解决办法,否则将在更高版本[> 5.1的支持。 61]?

在此先感谢。

回答

1

不,我们不能。即使我们有最好的关心特权allsuper

See (All) and (Super) Privileges Provided by mySql

试图像

grant super on *.* to [email protected] 
grant all on *.* to [email protected] 

所有类型的特权后,我曾尝试简单的触发不同的表mysql.db并得到了同样的错误

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

如果您发现任何地方,触发器可以在系统表中创建,简单地认为是错误的