Command line parameters not recognized correctly
After upgrading to 8.1.0.4545 parameters are not recognized correctly any more when calling HeidiSQL via command line (Ubuntu/Wine). HeidiSQL in my case always tries to connect with user root@localhost whenever a parameter (any parameter) is submitted.
E.G.
wine C:\\Programme\\HeidiSQL\\heidisql.exe -user=xxxx -password=yyyy -P=3310
results in SQL error 1045 "Access denied for user 'root'@'localhost' (using password: YES)"
Same if -user is the only parameter submitted.
Everything worked fine in earlier versions used with Wine and Linux.
Thank you.
Thomas
So, you should be able to fix your problem by prepending one more dash to your "user" parameter (and "password" also):
wine C:\\Programme\\HeidiSQL\\heidisql.exe --user=xxxx --password=yyyy -P=3310
wine C:\\Programme\\HeidiSQL\\heidisql.exe --user=xxxx --password=yyyy
wine C:\\Programme\\HeidiSQL\\heidisql.exe -u=xxxx -p=yyyy
The workaround does not solve my problem, because I want to call HeidiSQL from KeePass to avoid updating credentials in the session manager. (Indeed, I could easily use the session manager to open the connection, no need for command line than. Or downgrade to 8.0 again.)
Unfortunately, there seems to be no executable 8.1 prior to r4509 so that I could verify that this revision is causing the issue.
heidisql.exe -hIP -uxxx -pxxx
But the difference is, I am not on Wine but on a Windows 7 box. So, I can just guess that
Windows.GetCommandLine
does not work on Wine as on Windows.
This thread is everything I find related to the GetCommandLine function on Wine, but in a different context. Probably you find something more useful here?
wine C:\\Programme\\HeidiSQL\\heidisql.exe -h=localhost -u=xxxx -p=yyyy -P=3310 (connects)
If user is specified in first place, it obviously is ignored, root@localhost is used instead (which is default):
wine C:\\Programme\\HeidiSQL\\heidisql.exe -u=xxxx -p=yyyy -P=3310 (does not connect - as described)
If rootpasswd is submitted with example above, the connection for root is established:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -u=notroot -p=rootpasswd (connects as root!)
If a dummy parameter is specified in first place, all other parameters are interpreted as expected:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -z=foobar -u=xxxx -p=yyyy -P=3310 (connects)
Does that make any sense?
(I found the wine thread you're refering to. It's old, isn't it? Anyhow, it shows that wine developers do know Windows.GetCommandLine...)
What I found out so far: The first argument seems to be ignored. If I specified h=localhost (which is default) in first place, everything looks fine:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -h=localhost -u=xxxx -p=yyyy -P=3310 (connects)
If user is specified in first place, it obviously is ignored, root@localhost is used instead (which is default):
wine C:\\Programme\\HeidiSQL\\heidisql.exe -u=xxxx -p=yyyy -P=3310 (does not connect - as described)
If rootpasswd is submitted with example above, the connection for root is established:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -u=notroot -p=rootpasswd (connects as root!)
If a dummy parameter is specified in first place, all other parameters are interpreted as expected:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -z=foobar -u=xxxx -p=yyyy -P=3310 (connects)
Does that make any sense?
(I found the wine thread you're refering to. It's old, isn't it? Anyhow, it shows that wine developers do know Windows.GetCommandLine...)
Thomas, I have had a similar problem.
Read my thread. I solved it by adding more than just a single space between command (heidisql.exe) and parameters (-h=...)
http://www.heidisql.com/forum.php?t=15082#p15113
Then, I still do not know what Wine returns by Windows.GetCommandLine. It could be that "wine" is param 0, "C:\\Programme\\HeidiSQL\\heidisql.exe" is param 1, "-h=localhost" is param 2, and so on. Difficult to test. But I can probably add a debug log item with what Windows.GetCommandLine returns, then you activate Tools > Preferences > Logging > Debug messages, and you see what we have then.
If a dummy parameter is specified in first place, all other parameters are interpreted as expected:
wine C:\\Programme\\HeidiSQL\\heidisql.exe -z=foobar -u=xxxx -p=yyyy -P=3310 (connects)
So it has to do with params' count, order, and/or interpretation.
Please login to leave a reply, or register at first.