Last active
January 23, 2018 04:29
-
-
Save namklabs/2206509 to your computer and use it in GitHub Desktop.
database.mysql file import via command line
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
REM These commands allow you to dump a mysql database or import a database that is too large to be uploaded via PHPmyAdmin. | |
REM If importing, you should put your .sql file in your mysql bin dir ( for wamp: C:\wamp\bin\mysql\mysql15.5.20\bin\ ) | |
REM If exporting, the mysql bin dir is where the exported file will show up. | |
REM export a mysql database | |
REM wamp's username is root, does not have a password | |
mysqldump -u username -p password(optional) databasename > databasename.sql | |
REM import a mysql database | |
mysql -u username -ppassword databasename < databasename.sql | |
REM notice how there is no space after the -p switch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment