Skip to content

How to Import From a Remote MySQL Database in Windows

  • by
You can pipe the remote dump result into the local database in Windows like this:
C:Usersed>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:Usersed>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.
...

Leave a Reply

Your email address will not be published.