Celebrate Our 22nd Anniversary with Huge Savings! Up to 70% Off

How to restore MySQL database using Command Prompt?

Step 1: Open a Command Prompt.


Step 2: Go to the MySQL bin folder.

cd "C:\Program Files\MySQL\MySQL Server 5.6\bin"

or

cd "C:\Program Files\MySQL\MySQL Server 5.7\bin"


Step 3: Execute the following command to restore the database.

mysql -u [username] –p [database_name] < [dump_file.sql]

> database_name is the name of the empty database into which you want to load data from the backup file.


Step 4: Enter the username password if prompted for a password.


Was this answer helpful?

« Back