开发者

Export mysql dump file, such that statments are in the order of dependency

开发者 https://www.devze.com 2022-12-19 17:29 出处:网络
I need to create a dump file such t开发者_JAVA百科hat when i execute it, i have no depency issues

I need to create a dump file such t开发者_JAVA百科hat when i execute it, i have no depency issues

  1. tables run before queries
  2. parent tables before child tables etc
  3. no failed insert due to foreign key failures


Two tables may refer each other with FK so not always possible to create and insert "parent first".

Use mysqldump . It will disable foreign keys before importing data and enable afterward. (this is also much faster).

0

精彩评论

暂无评论...
验证码 换一张
取 消