title: Export mysql dump file, such that statments are in the order of dependency
body: <p>I need to create a dump file such that when i execute it, i have no depency issues</p>
  
  <ol>
  <li>tables run before queries</li>
  <li>parent tables before child tables etc</li>
  <li>no failed insert due to foreign key failures</li>
  </ol>