I need to create a dump file such t开发者_JAVA百科hat when i execute it, i have no depency issues
- tables run before queries
- parent tables before child tables etc
- 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).
精彩评论