Hi I installed the latest WAMP on Windows 7. I would like connect via SSH to MySQL database and create dump.

As SSH client I use PUTTY.

I tried using the root account and also other accounts, but I get this error:

server unexpectedly closed network connection

Then I tried using another SSH client Private Shell http://www.privateshell.com/

I get this error:

other side does not support SSH protocol on this port

For connection I use these settings:

  • IP: localhost
  • PORT: 3306

MySQL version is 5.5.16 I am not sure if support SSH connection.

Is it needed to allow SSH in phpAdmin or what is the root of problem?

  • No, MySQL doesn't support SSH in any way. You probably want SSL secured connection? – Sami Kuhmonen Aug 1 '15 at 23:55

Is there a SSH server on your machine?? If not you may install copssh - OpenSSH for Windows or similar and then try to connect.

| improve this answer | |

You need to have ssh server running on windows. I use bitvise winsshd

| improve this answer | |

You need to

| improve this answer | |

Go to folder C:\wamp\bin\mysql\MYSQL_VERSION\bin

Hit shift + right-click in that folder and select "Open command window here" from the menu that pops up.

This will open a command window in the path you are already in, so C:\wamp\bin\mysql\MYSQL_VERSION\bin

Enter any of the MySQL commands you like with any of the executables you find in that folder.

For example check this post to learn how to use mysqldump.exe to back up or restore any of your MySQL databases: https://css-tricks.com/back-wordpress-database/

For WAMP on Windows and a local development environment you or rather your PC is the MYSQL Server.

Have fun.

edit: Regarding the downvote I would be curious to hear why on Windows with a local WAMP installation this is not perceived a good method. It works flawless every time. Happy to learn more about this, a constructive comment or edit of my answer would be great in this case. Thank you. :)

| improve this answer | |
  • The downvote is because the question is about an SSH issue, which your answer says nothing about. – ypercubeᵀᴹ Aug 1 '15 at 23:36
  • @ypercube yes, totally right, I get it, thank you for the heads up. I figured most posts on this mention SSH as the examples are either for Unix system or for live servers, so SSH is a must there. For local work this should suffice, but yes, you are right, the question is tagged SSH. Thank you. ;) – lowtechsun Aug 1 '15 at 23:39
  • yes, I meant that if you said something like "no, this can't be done with ssh in Windows or you need to install this and here is an alternative" the answer would be ok. And for the record, this is a very old question and not a very good or clear one. I voted to close it as well. – ypercubeᵀᴹ Aug 1 '15 at 23:41
  • @ypercube Yeah probably best to close it, I take your point, though for new users this is an easy way to have a very first and tiny sense of achievement, if this is not closed in some days time I will add more info to my answer to incorporate the SSH part as well. Or hey, if you like to edit my answer and add the SSH bit, that would help all of the readers of this. As you like. Thank you. – lowtechsun Aug 1 '15 at 23:48
  • Let me get my bits and bobs about SSH on Windows right and I will surly edit this, fingers crossed. Would not want to add info that is not correct. – lowtechsun Aug 1 '15 at 23:54

Much simpler way to go about this.

Copy cmd.exe from your system32 folder, copy to: C:\wamp\bin\mysql\MYSQL_VERSION\bin

Open cmd, run the following command:

mysqldump.exe -u USERNAME -pPASSWORD DB_NAME > "DIRECTORY_TO_DUMP.sql" --lock-tables=false


Using the various executables, you can do pretty much anything.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.