Skip to content

How to Import From a MySQL Dump File in Windows

  • by
You can use "<" to redirect the input file to mysql like this:
C:UsersedDownloads>mysql -u root -p database_name < dump_file.sql
Enter password: ********
...

If you met problems when executing "mysql", you have to make sure that you were executing the correct execution file first:
C:UsersedDownloads>where mysql
...

Use where to show the location of the execution file.

If the location cannot be found or is wrongly pointed, you can go directly to the right path to do the importing like this.
C:UsersedDownloads>cd C:wampbinmysqlmysql5.6.12bin

C:wampbinmysqlmysql5.6.12bin>mysql -u root -p database_name < C:UsersedDownloadsdump_file.sql
Enter password: ********

Leave a Reply

Your email address will not be published.