tags:

views:

19

answers:

1

I need to create a dump file such that 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
+1  A: 

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).

noonex