I got the error “Trigger already exists” error while I was re-importing a MySQL database.
A solution to this problem is to create DROP queries for all the Triggers of the database.
SELECT Concat('DROP TRIGGER ', Trigger_Name, ';') FROM information_schema.TRIGGERS WHERE TRIGGER_SCHEMA = 'your_database_name';
This will print out the DROP statements for all the triggers.
You can then run all the DROP queries which will delete all the triggers.
After that, you should be able to re-import your database.
If you do not want the Triggers in your database dump file, then you can also use the –skip-triggers option in the
mysqldump
command.
Hope this helps. Thanks.