SSH connection problem
| User, date | Message |
|---|---|
|
Written by miked
2 years ago Category: Creating a connection 16 posts since Mon, 09 Nov 09 |
HeidiSQL 6.0.0.3974 Plink 0.61 (downloaded from link on SSH Tunnel tab in session mgr) XPsp3 system running HeidiSQL connecting to a FreeBSD box running MySQL 5.0.77-log The problem I am attempting to solve is: When I attempt to connect to the ssh host HeidiSQL returns a dialog stating: SQL Error (2013): Lost connection to MySQL server at 'reading initial communication packet', system error: 2 If I remove the path to the plink.exe location then HeidiSQL will reveal the command it is attempting to run: plink -ssh user@host.com -pw password -P nonstdport -N -L 3307:host.com:3306 ssh runs on a non-std port, mysql runs on std port 3306 So, to troubleshoot this problem I open an XP cmd window and run the plink command (with the correct params for my server/host/ports) without the -N option everything works fine. I get a shell prompt, can run a command line into mysql, execute any query against the db, logout of mysql, logout of the shell, and get a DOS prompt back If I run the above command with a -v option from the DOS command line to see the extra output I get:
Thought I'd check here first before reporting a bug to see if I've missed something on my end. |
|
Written by miked
2 years ago 16 posts since Mon, 09 Nov 09 |
well, 140 views and not a peep from anybody how about a different approach - is there a log that exists or that I can turn on to see/expose what Heidi is running into? |
|
Written by ansgar
2 years ago 3949 posts since Fri, 07 Apr 06 |
You can turn on debug messages in Tools > Preferences > Logging. But that won't reveal much relevant stuff I'm afraid. I have no clue what's going on here. |
|
Written by janyan28
1 year ago 4 posts since Mon, 16 Jan 12 |
Hi miked, were you ever able to resolve this problem? I am experiencing exactly the same thing ... |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
nope, have not been able to resolve. will try to have another go at it. @anse - any chance of adding additional logging to the heidisql code to track the remote ssh processes and help identify the problem area? looks like you have 2 users who would be able to contribute testing/info to help resolve the problem |
|
Written by janyan28
1 year ago 4 posts since Mon, 16 Jan 12 |
miked, thanks for the update. My problem is identical, except that I had no problems whatsoever until sometime in the last 30 days. Haven't upgraded heidisql ... |
|
Written by ansgar
1 year ago 3949 posts since Fri, 07 Apr 06 |
Yes, I'm willing to help out, please tell me what I shall log additionally. |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
anse - not sure what the login negotiation looks like, so by default I'd think that it would be helpful to log everything that heidisql does when trying to ssh connect such as connection config params, any messages, durations if possible - perhaps into an ssh.log file to keep the ssh logging out of the existing log. appreciate you offering to do this |
|
Written by janyan28
1 year ago 4 posts since Mon, 16 Jan 12 |
@anse - when using plink from the command line, one can specify verbose mode, which returns tons of information, maybe that's what we need here. Let me know if there's anything I can do to help ... |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
enabling -v plink option is a good idea |
|
Written by ansgar
1 year ago 3949 posts since Fri, 07 Apr 06 |
Probably I can grab stdOutput from the plink.exe process, using some code from here. |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
just checking in to see if there is any update on this - anything I can provide in the way of help from my end? |
|
Written by ansgar
1 year ago 3949 posts since Fri, 07 Apr 06 |
Well, probably file an enhancement request in the bugtracker, as these forum topics are often overseen. However, can take a while before I find the time for this stuff. |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
added issue 2711 to add logging, tried to make it simple to help get it included quickly -- I have 2 remote servers that I support, having the ability to ssh tunnel into them to massage the db would be an epic help http://code.google.com/p/heidisql/issues/detail?id=2711 |
|
Written by miked
1 year ago 16 posts since Mon, 09 Nov 09 |
have a workaround solution that I'm using, thought I'd document it here in the hopes that it will help others: ssh -p9999 -f -N -L7777:localhost:3306 mike@server.com where: -p9999 is the remote port that you attach to when you connect via ssh client -L7777 is the new port number on your local box to get to the remote mysql mike@server.com your ssh username on the remote box, replace server.com with your hostname when you rework the cmd line above to match your settings fire up a cmd window and paste the command in and hit enter you should be prompted for your ssh login password, and you'll get back a DOS prompt. open up Heidi, set the hostname/ip to the new server to be address = 127.0.0.1, and port 7777, use your msql user and pwd in the main screen, set the network type to tcp/ip. login and enjoy. |
|
Please login to leave a reply, or register at first. |