mysqldatabasetriggersdumpmysql-error

Mysqldump without triggers : ERROR 1359 (HY000) at line 1420: Trigger already exists


I'm using mysqldump to share databases dumps, but I'm having an issue with triggers. The command does not add "drop" or "replace" lines with the triggers, making people who already added a previous dump with same triggers names having an error :

ERROR 1359 (HY000) at line 1420: Trigger already exists

I've read on forums people saying it's a missing feature for MySQL, but all posts are old and I'm wondering if there could be a way to do it now.

I know there is a way to dump schema and data separately, but i'd like to keep a single dump to share.


Solution

  • There's a mysqldump option --skip-triggers you should use that to skip triggers.