Possible Duplicate:
mysql: Cant we create triggers on system tables?
We are using MySQL
ver 5.1.59
on rhel 6.1 (64 bit)
. We want to monitor the deletion of databases and for that trying to create a trigger on the db table of mysql
database. We are creating the trigger
by logging in as root user
. the trigger written is as follows:
DELIMITER |
CREATE
/*[DEFINER = { user | CURRENT_USER }]*/
TRIGGER `mysql`.`test` BEFORE DELETE
ON `mysql`.`db`
FOR EACH ROW BEGIN
INSERT INTO cescnet.db_monitor (DB_name,user_name,dateandtime,operation_type) VALUES (mysql.db.Db,CURRENT_USER(),NOW(),'Delete');
END;|
But we are getting the error:
Error Code : 1465
Triggers can not be created on system tables
As we are working as root user, we think we have all the permissions on the system. The global privilege for root user from any host including local host includes the SUPER permission. Can anyone help us please?