Created
September 17, 2013 17:49
-
-
Save light9/6597974 to your computer and use it in GitHub Desktop.
Import/Export Large MYSQL Databases
http://www.lullabot.com/blog/news/importexport-large-mysql-databases
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
| //Copy/Export a Large Database | |
| mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz | |
| //Import a Large Database | |
| //First, unzip the file. | |
| //gzip -d [/path_to_file/DBNAME].sql.gz | |
| mysql -u root -p | |
| SHOW DATABASES; | |
| CREATE DATABASE [DBNAME]; | |
| USE [DBNAME]; | |
| SOURCE [/path_to_file/DBNAME].sql; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment