Skip to content

Instantly share code, notes, and snippets.

@fatadz
Created February 15, 2023 01:33
Show Gist options
  • Save fatadz/c805ef7ac1f94bf20c78a0b424b01ab9 to your computer and use it in GitHub Desktop.
Save fatadz/c805ef7ac1f94bf20c78a0b424b01ab9 to your computer and use it in GitHub Desktop.
Export or dump MySQL table structure and data, then import it
#export
mysqldump --set-gtid-purged=OFF -h host_source -u username -p db_name > ~/dump.sql;
#import
mysql -h host_destination -u username -p db_name < ~/dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment