I need to recover a database with a data-only DB dump (made only of "insert"). I don't want to run triggers during this recovery, how can I do?
2 Answers
If you have the option of recreating the dump, use the --skip-triggers option when running it. You will have to recreate the triggers afterwards, but it's a lot less painful.
Comments
MySQL currently does not have this feature. Here are some links that may be of interest and give some ideas.
Also, if you have the ability, you can make:
- Backup triggers only
- Remove all triggers
- Restore database
- Create triggers again
It's more work, but a workaround to lack of feature.