Solved

Recover Trigger in MySQL

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

Suggested Solutions

Title # Comments Views Activity
High Bandwidth Usage 6 56
update joined tables 2 46
mysql joining from the same table 6 42
T-SQL: Do I need CLUSTERED here? 13 43
Creating and Managing Databases with phpMyAdmin in cPanel.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…

773 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