Solved

Recover Trigger in MySQL

Posted on 2009-07-05
4
1,038 Views
Last Modified: 2013-11-08
HI,

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.

Thanks.
0
Comment
Question by:sandeep1984
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24783025
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.
0
 
LVL 2

Author Comment

by:sandeep1984
ID: 24783979
Can I identify which user has deleted the trigger?
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24784026
You can use mysqlbinlog to read the transactions happened in database through Binary Log files.

For more info:

http://www.mydigitallife.info/2007/10/06/how-to-read-mysql-binary-log-files-binlog-with-mysqlbinlog/

But in your case to track it out provided it is not disabled by administrator in my.cny configuration file.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now