Created
May 6, 2013 13:30
-
-
Save JohnathanMarkSmith/5525146 to your computer and use it in GitHub Desktop.
How to load MySQL Database from Command Line in Linux
This file contains 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
I been getting asked, How can I load my MySQL database from the command line? | |
So I am going to make this quick and easy… | |
First cd in the folder where your sql file is, for this demo I am using a file called “backup.mysql”. Then use the following command | |
mysql --user root --password regandb < backup.mysql | |
MySQL will prompt you for a password then your mysql will be loaded depending on how big your backup/file is it may take some time. You could add a -f flag if your database is very big, it will prevent it from stopping if there is error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment