• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1169
  • Last Modified:

Recover Trigger in MySQL


By mistake a trigger has been deleted.
I am using MySQL 5.1 installed in CentOS 5

Is there any ways to recover the trigger.

  • 2
1 Solution
Raja Jegan RSQL Server DBA & ArchitectCommented:
Unfortunately there is no direct way to recover your trigger.

You can restore the backup of your database if you have to another database and then script this trigger from the restored database and then create the trigger back in your database.

Kindly check that your trigger functionality for the period it was not in your database was lost.
You have to take care of those activities.
sandeep1984Author Commented:
Can I identify which user has deleted the trigger?
Raja Jegan RSQL Server DBA & ArchitectCommented:
You can use mysqlbinlog to read the transactions happened in database through Binary Log files.

For more info:


But in your case to track it out provided it is not disabled by administrator in my.cny configuration file.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now