Skip to content

Instantly share code, notes, and snippets.

@benyanke
Created February 15, 2019 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benyanke/fd40865cd2f5311b5516df2703e986df to your computer and use it in GitHub Desktop.
Save benyanke/fd40865cd2f5311b5516df2703e986df to your computer and use it in GitHub Desktop.
This drops all the tables in elastic beanstalk
echo "SET FOREIGN_KEY_CHECKS = 0; `mysqldump --add-drop-table --no-data -h $RDS_HOSTNAME -u $RDS_USERNAME -p$RDS_PASSWORD $RDS_DB_NAME | grep 'DROP TABLE'` ;SET FOREIGN_KEY_CHECKS = 1;" | mysql -h $RDS_HOSTNAME -u $RDS_USERNAME -p$RDS_PASSWORD $RDS_DB_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment