Baran Topal

Baran Topal


May 2024
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories


SSH and MySQL on Windows to Linux

baranbaran

SSH and MySQL operations from Windows to Linux:
Ah, yes, I have a mysql dump in my windows environment and want to import it from windows to remote linux server via ssh.
I have putty and root rights, now, let’s think: What is the working command for this?

You either scp the data from windows to Linux or you would need to get Cygwin in a Cygwin environment on you could run:

cat mysqldumpfile | ssh user@remotesystem "cat - | mysql -uusername --password=password databasename"

The | opens a tunnel that will feed the info through the ssh tunnel to cat on the other side which will pass it on stdout to the stdio of the MySQL command that will restore the database data on the remote mysql server. Alternatively, if you have phpmyadmin, you can use http://www.phpmyadmin.net/home_page/news.php#phpMyAdmin_3.4.11.1_and_3.5.2.2_are_released

or you can use mysql workbench:

https://www.mysql.com/products/workbench/

Tip: I prefer scp 🙂
<a href=”http://winscp.net/eng/download.php”>http://winscp.net/eng/download.php</a>

Comments 0
There are currently no comments.