MySQL Forums
Forum List  »  Triggers

Trigger gets deleted
Posted by: aaron M
Date: January 10, 2012 07:48PM

So I've been successful in implementing a trigger into existing database(database1). If I manually enter data into table1 the trigger makes necessary update to table2. All works as expected, except for the following:
mysql database1 < mydbdump.sql

the file mydbdump.sql has a "drop table table1 if exists" and a create table1 section....when i run the above command it deletes the trigger and data only gets entered into table1.

if I delete the drop table and create table section from the mydbdump.sql and restart the trigger and run the: mysql database1 < mydbdump.sql
everything works as expected.

How do I work around this? I have many mydbdump.sql files that I need to manually import into new database...Appreciate any help.

Aaron

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger gets deleted
1929
January 10, 2012 07:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.