Skip to content

Instantly share code, notes, and snippets.

@pm98zz-c
Created July 11, 2017 14:09
Show Gist options
  • Save pm98zz-c/e901b95804792a30f8985ac8bcdb8fdf to your computer and use it in GitHub Desktop.
Save pm98zz-c/e901b95804792a30f8985ac8bcdb8fdf to your computer and use it in GitHub Desktop.
quick test of db clone
mysql -uroot -e "show tables FROM drupal;" | grep -v '^Tables_in_' | { while read -r table ;\
do mysql -uroot -e "CREATE TABLE new_build.$table AS SELECT * FROM drupal.$table;"; \
done ; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment