Created
January 31, 2018 14:02
-
-
Save andysdesigns/12005a233a8bb73413a5dc61c5ab5b52 to your computer and use it in GitHub Desktop.
Mysql Import + Export using terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import .sql.gz with progress bar | |
| >> pv [/path/to/database.sql.gz] | gunzip | mysql -u [username] -p [database_name] | |
| --- | |
| # import .sql without progress bar | |
| >> mysql -u [username] -p [database_name] < [/path/to/database.sql] | |
| --- | |
| # export | |
| >> mysqldump -u [username] -p [database_name] > [database_name.sql] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment