Skip to content

Instantly share code, notes, and snippets.

@panagiotisTB
Created May 4, 2016 12:01
Show Gist options
  • Save panagiotisTB/72f06c4c8fd3ad4ed33c804694a630e5 to your computer and use it in GitHub Desktop.
Save panagiotisTB/72f06c4c8fd3ad4ed33c804694a630e5 to your computer and use it in GitHub Desktop.
Create MySQL dump and import it to another database
# Export dump as .sql
mysqldump -u [username] -p [database_name] > [dump_name].sql
# Enter database password
# Import dump to new databse
mysql -u [username] -p -h [databse_host] [database_name] < [dump_name].sql
# Enter database password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment