Skip to content

Instantly share code, notes, and snippets.

@gemmadlou
Last active March 4, 2020 16:29
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 gemmadlou/4a64d563ce09ba5f12951531fb3fc548 to your computer and use it in GitHub Desktop.
Save gemmadlou/4a64d563ce09ba5f12951531fb3fc548 to your computer and use it in GitHub Desktop.
MySQL imports
mysql --defaults-group-suffix=_products --database data_analysis -e "load data local infile 'data/file.csv' into table table_name fields terminated by ',' enclosed by '\"' lines terminated by '\n'"
mysql --defaults-group-suffix=_products --database data_analysis < file.sql
# Dump
mysqldump --defaults-group-suffix=_local_products --column-statistics=0 --no-create-info --set-gtid-purged=OFF --insert-ignore rentr > test.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment