Skip to content

Instantly share code, notes, and snippets.

@nikolazic
Created November 20, 2013 22:14
Show Gist options
  • Save nikolazic/7572069 to your computer and use it in GitHub Desktop.
Save nikolazic/7572069 to your computer and use it in GitHub Desktop.
MySQL Dump
mysqldump --single-transaction <dbname> | sed -E 's/DEFINER=`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g' | bzip2 > <dbname>-`date +%Y%m%d`.sql.bz2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment