?
Solved

Recover Trigger in MySQL

Posted on 2009-07-05
4
Medium Priority
?
1,102 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
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…

770 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