Restore data from remote server using ".sql" file I have a ".SQL" file which contains data at a remote server. I could download that file to my local machine and import data in my local DB, but because of network issues, and the size of ".sql" file (6.7GB) it's taking forever. 

Is there any way I could execute the restore command on remote server and tunnel the output to my local machine DB ?

Thanks for help !
You should gzip the file.

gzip DataFile.sql


Then, download it to the local machine.

Once it is on the local machine, run the following:

gzip -d &lt; DataFile.sql.gz | mysql -uroot -p... ...


If you would rather import through the tunnel, try this on the remote server:

mysql -h&lt;IP of your machine&gt; -uroot -p... &lt; DataFile.sql


If you local Linux machine has a firewall, run this

service iptables stop


then run the import. Finally, run this on your local box and put up the firewall

service iptables start