Jump to content

Drop / Truncate / Alter Trigger?


davej

Recommended Posts

Would it be practical to set up triggers on a MySQL database so that if anyone executes a drop or alter command a trigger would fire and record that event? I would then want to fire off an email to the admin. This is a Joomla website so there are about 160 tables.

 

--edit--

 

No, apparently it isn't possible to assign a trigger to a drop or alter event.

 

https://dev.mysql.com/doc/refman/5.7/en/create-trigger.html

 

I guess an alternative might be a periodic stored procedure that runs a set of 160 queries that detect whether the size of any table has changed by more than some percentage.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...