Skip to content

Instantly share code, notes, and snippets.

@jbonney
Created September 17, 2014 06:03
Show Gist options
  • Select an option

  • Save jbonney/32a25f7ba0a266d3b3db to your computer and use it in GitHub Desktop.

Select an option

Save jbonney/32a25f7ba0a266d3b3db to your computer and use it in GitHub Desktop.

Revisions

  1. jbonney created this gist Sep 17, 2014.
    5 changes: 5 additions & 0 deletions drop_tables.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    user=...
    pass=...
    host=localhost # or remote if necessary
    database=...
    mysqldump -u${user} -p${pass} -h ${host} --add-drop-table --no-data ${database} | grep ^DROP | mysql -u${user} -p${pass} -h ${host} ${database}