MySQLDump to local machine from remote server connected via SSH

mysql, ssh

Solution

Use like this:

mysqldump -P3306  -h192.168.20.151 -u root -p database > c:/my.sql

Hope to help you:)

Edition for linux

mysqldump -u root -p databasename > ~/Downlaods/filename.sql

Problem

``` mysqldump -h xxx.xxx.xxx.xxx -u username -ppassword databasename > C:\path\to\store\file ``` It seemed to work as it paused while the file was downloading, however no file appears once it completes. Do I have something wrong in the command line?

Original source