Solved

Recover Trigger in MySQL

Posted on 2009-07-05
4
1,048 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…

863 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

24 Experts available now in Live!

Get 1:1 Help Now