Skip to content
Home » MySQL » MySQL Import Local Dump in Windows

MySQL Import Local Dump in Windows

For Linux platform, you can also perform an import of a MySQL dump file.

You can use < to redirect the input file to mysql like this:

C:\Users\alex\Downloads>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:\Users\alex\Downloads>where mysql
...

Use where command to show the location of the execution file in Windows.

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:\Users\alex\Downloads>cd C:\wamp\bin\mysql\mysql5.6.12\bin

C:\wamp\bin\mysql\mysql5.6.12\bin>mysql -u root -p database_name < C:\Users\alex\Downloads\dump_file.sql
Enter password: ********

As for importing remote MySQL dump file in Window, you may have a look.

Leave a Reply

Your email address will not be published. Required fields are marked *