2012-04-27 162 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並得到了同樣的錯誤

觸發器無法在系統表上創建//請接受此 痛苦的真理

如果您發現任何地方,觸發器可以在系統表中創建,簡單地認爲是錯誤的