带有联合表的 mysqldump
我需要 mysqldump 包括数据,但在数据库中还有几个带有 FEDERATED 引擎的表。 mysqldump 也包括 FEDERATED 表的 INSERT,这会导致例如“重复条目”错误(因为表已经填充了数据)。
我可以分别转储结构和数据,然后删除 FEDERATED 表的 INSERT, 但这与“自动进行可靠备份”并不完全相同
如何使用FEDERATED表备份然后恢复Mysql数据库?
I need mysqldump including the data, but in database there are also couple of tables with FEDERATED engine. The mysqldump includes INSERTs for FEDERATED tables too, what makes for exemaple "Duplicate entry" errors (because the table is already filled with data).
I can dump structure and data separately and then remove INSERTs for FEDERATED tables,
but this is not exactly the same as "make automatically reliable backups"
How to backup and then restore Mysql databases with FEDERATED tables?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
快速查看差异后,解决方案是编译您自己的 mysqldump 修补版本,默认情况下会跳过 FEDERATED 表的 INSERT。 我自己还没有尝试过应用它,所以 YMMV。
http://bugs.mysql.com/bug.php?id=32038
After a quick look at the diff, the solution to this is to compile your own patched version of mysqldump that by default skips INSERTs for FEDERATED tables. I have not tried to apply it myself so YMMV.
http://bugs.mysql.com/bug.php?id=32038