如何根据表日期导出MySQL表?
如何导出数据库但根据创建日期导出表? B/C 我面临这个问题,在导出此数据库时,由于某些表具有外键并通过它们的键链接到其他表,我该如何导出来克服这个问题?
How do I export a database but export the tables based on their date created? B/C I'm facing this issue where when exporting this database, since some of the tables have foreign keys and linked to other tables by their keys, how do I export to overcome that issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想按创建日期的顺序导出数据库的表,您可以使用 SQLyog 计划备份,您可以在其中使用:
还有一个选项 SETforeign_key_checks = 0;在进行备份时,这样您就不会遇到任何与外键相关的问题;-)
If you want to export the tables of a database in order by date created you can use SQLyog Scheduled backup, where you have:
There is also an option to SET foreign_key_checks = 0; while taking backup so that you don't run into any foreign key related issues ;-)
实际上,我认为您想要的是在插入行时向导入文件添加几行:
这样插入可以按任何顺序发生。
Actually, I think what you want is to add a couple of lines to the import file when inserting rows:
This way the inserts can occur in any order.