distal-attribute
distal-attribute
distal-attribute
distal-attribute

Cant connect with command line. GUI connects ok

User, date Message
Written by peperfus
5 months ago
Category: Creating a connection
10 posts since Tue, 04 Mar 14
Hello

First, thank you for this wonderful mysql client. I'm considering making a donation. I will if you solve my problem.

Sorry for bad english.

I am trying to connect with command line to my remote server.
All parameters are OK
user ok
password ok
host ok
port ok

When I use GUI, connects ok, it works perfect.
But using command line fails:
Cant connect to mysql server on '127.0.0.1' (10061)

Also, Don't understand why it tries to connect to localhost, when I specified -h=remoteserverurl.com (also tried -h=remoteserverIP).

My heidisql is latest. I have read several solutions, but none worked for me or didn't understand. I don't use "plink.exe" (neither know what it is...), In GUI, I use normal connection.

Thank you

Thank you.
Written by kalvaro
5 months ago
587 posts since Thu, 29 Nov 07
You apparently have a bogus = sign. The valid syntax is:

--host=host_name, -h host_name



To make this off-topic, Tools-> Launch command line will connect automatically for you.
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
I am trying to connect with command line for adding an entry to KeePass.

Windows command line (cmd):
heidisql.exe -h abcd.com -u user -p pwd -P port

still same error.

If I use such parameters in GUI, connects ok.

I am using windows xp
No mysql installed.

Still don't understand why tries to connect to 127.0.0.1 instead of abcd.com



Thanks for your help
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
I get "Can't connect to MySQL server on 'abcd.com' (10060)" with your command line.

Please check which version of HeidiSQL you are running. I recall there was a bug which I fixed not so long ago. Updating to the latest release or build could fix your problem.
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
Hello

I have tried something curious...
I have tried the same in an oracle vm virtualbox and it works from command line.
It must be some of my windows xp config or anything... firewall config or anything that doesn't let heidisql command line connect to remote host.

I keep testing till guess what is the matter and when I solve it I will post it.
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
Ok, this is madness.

I have renamed my.ini of my wamp to my.ini.bak.
Try... WORKS OK.
Rename my.ini.bak to my.ini, Try... WORKS.
Try the latest portable version: WORKS
Try the latest installed version: WORKS.

Don't understand anything. Why works now and what solved the matter. MADNESS.

Try on my buddy computer... Doesn't work.
rename his my.ini to my.ini.bak
(wamp was allways stopped (all services down) in ALL cases)
Doesn't work.
Firewall --> OFF
Doesn't work.

Madness.

Now it works on my computer. Doesn't work on his.
Worst of all is We don't know what solved the problem on mine.

Any suggestion to help clarify this mistery ?
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
You did not read my notice about updating HeidiSQL?
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
Hello, Yes, I read it. But I had already the latest version. Anyway I downloaded again it and installed and it kept failing.

Listen !!

I FOUND What makes it WORK !! and you won't believe it.

executing this:
heidisql.exe [parameters] DOESN'T WORK

BUT !!

executing:
heidisql.exe [parameters] WORKS PERFECT.
(more than 1 white space between heidisql.exe and [parameters])

heidisql [parameters] also works.
(five spaces between command and parameters)

I got crazy till I found this solution, but this is what works for me and my buddy.

Review your source code, ther part where you catch arguments string. It seems you cut some characters...
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
forum code cut the spaces.

I meant:

heidisql.exe__[parameters]
(2 spaces)
and
heidisql_____[parameters]
(5 spaces)
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
GREAT program, anyway. Very satisfied with it.

I just made a 5€ donation.

Thanks and continue making HeidiSQL better.
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
Oh... multiple spaces. I should fix that.
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
This seems to be a WinXP issue, along with Windows.GetCommandLine. On Win7, there is no requirement for more than 1 space.
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
Fixed in r4727
Written by ansgar
5 months ago
4937 posts since Fri, 07 Apr 06
See also: http://social.msdn.microsoft.com/Forums/vstudio/en-US/5e737981-3ce1-4742-aa84-9d3f8c7a6b1d/getcommandline-space-problem-in-windows-2008?forum=vclanguage
Written by peperfus
5 months ago
10 posts since Tue, 04 Mar 14
Perfect smile
 

Please login to leave a reply, or register at first.