musql shell launch

[expired user #6771]'s profile image [expired user #6771] posted 12 years ago in Feature discussion Permalink
Hi, i just update HeidiSQL & find feature to launch shell.
but i found some bug in there
in my local mysql db i have password digits,letters and "; symvols
when i try to launch shell it's does not started correctly..
Launching command line: Z:\usr\local\mysql-5.5.28-win32\bin\mysql.exe --host="127.0.0.1" --port=3306 --user="myusername" --password="********"c"v2012"

i gues it's a password truble, because my password length is 19 symbols, but in log i see only 16..
PS: last sumbol before "c" is ;

HeidiSQL version 7.0.0.4315
Mysql 5.5.28-win32
OS 7601.17803.x86fre.win7sp1_gdr.120330-1504
ansgar's profile image ansgar posted 12 years ago Permalink
The stars are only a cosmetic problem, just what HeidiSQL displays in its log. But on a command line, MySQL.exe has a similar problem with such a password, as it is surrounded by double quotes. If it contains double quotes, I don't know if there is a way to escape these.
ansgar's profile image ansgar posted 12 years ago Permalink
Ah, and do not rely on the number of stars! It does intentionally not match the length of your password, for security reasons.
Code modification/commit 60618e4 from ansgar.becker, 12 years ago, revision 7.0.0.4316
Launch command line: Escape double quotes in password, and fix broken replacement with stars if password contains double quotes. See http://www.heidisql.com/forum.php?t=11976
ansgar's profile image ansgar posted 12 years ago Permalink
Please try out r4316 - works for me when using double quotes and semicolon within a 22 character password.
ansgar's profile image ansgar posted 12 years ago Permalink
The quoting stuff is more a Windows problem than a MySQL problem. You can surround parameters with double quotes, because the command shell is capable of removing these when passing to the program. Further, you need to escape double quotes with a backslash:
mysql.exe --host="localhost" --port=3306 --user="root" --password="your\"password"

This certainly does not only apply to the password parameter, although my fix in r4316 does it only for the password - I guess host names and user names never contain double quotes... do they? No :)
[expired user #6771]'s profile image [expired user #6771] posted 12 years ago Permalink
Problem fixed TNX for fast responce

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