Skip to content

Instantly share code, notes, and snippets.

@darmawan01
Created May 18, 2020 15:09
Show Gist options
  • Save darmawan01/166648dfa3002662863f6ef3662ebbec to your computer and use it in GitHub Desktop.
Save darmawan01/166648dfa3002662863f6ef3662ebbec to your computer and use it in GitHub Desktop.
Mysql Command

Backup:

mysqldump --column-statistics=0 --set-gtid-purged=OFF -h<Host> -u<User> -p<Password> <db_name> > backup.sql

Restore:

mysql -u<User> -p<Password> <dest_db> < backup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment