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

MySQL Import Remote Dump in Windows

You can pipe the remote dump output into the local database in Windows like this:

C:\Users\ed>mysqldump -u root -p -h db.example.com database_name | mysql -u root -p database_name
Enter password: Enter password: ********
************
...

Please note that, there are two passwords required to be entered in the above example. You can also include the two passwords in the command line to skip the prompts.

C:\Users\ed>mysqldump -u root -p"remote_password" -h db.example.com database_name | mysql -u root -p"local_password" database_name
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
...

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

Leave a Reply

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