[英]Mysql Disable trigger during database recovery
I need to recover a database with a data-only DB dump (made only of "insert"). 我需要恢复一个只有数据的DB转储数据库(只有“插入”)。 I don't want to run triggers during this recovery, how can I do?
我不想在这次恢复期间运行触发器,我该怎么办?
If you have the option of recreating the dump, use the --skip-triggers
option when running it. 如果您可以选择重新创建转储,请在运行时使用
--skip-triggers
选项。 You will have to recreate the triggers afterwards, but it's a lot less painful. 之后你将不得不重新创建触发器,但它不会那么痛苦。
MySQL currently does not have this feature. MySQL目前没有此功能。 Here are some links that may be of interest and give some ideas.
以下是一些可能感兴趣并提供一些想法的链接。
Also, if you have the ability, you can make: 此外,如果你有能力,你可以:
It's more work, but a workaround to lack of feature. 这是更多的工作,但有解决方法缺乏功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.