Skip to content

Instantly share code, notes, and snippets.

@jkullick
Last active July 29, 2016 12:07
Show Gist options
  • Save jkullick/54bb40ff5e4fb89cf7ab459fe5eec13d to your computer and use it in GitHub Desktop.
Save jkullick/54bb40ff5e4fb89cf7ab459fe5eec13d to your computer and use it in GitHub Desktop.
Replace String in entire MySQL Database
mysqldump -u$USER -p$PASSWORD $DATABASE | \
  sed -e 's/$OLD_STRING/$NEW_STRING/g' | \
  mysql -u$USER -p$PASSWORD $DATABASE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment