Bug #7614 Space between -p and password causes connect failure
Submitted: 2 Jan 2005 9:46 Modified: 2 Jan 2005 11:04
Reporter: John Spikowski Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:4.1 OS:Windows (Windows 2000 Pro)
Assigned to: Sergei Golubchik CPU Architecture:Any

[2 Jan 2005 9:46] John Spikowski
Description:
While using the mysql command line utility to access a remote database via TCP, I discovered that if you have a space between the -p and the password, the connection fails. All other parameters seem to deal with the space after the option flag just fine.

Example:

mysql -h 60.50.200.10 -D sanjuana_airline -u sanjuana_myid -p mypw (FAILS)

mysql -h 60.50.200.10 -D sanjuana_airline -u sanjuana_myid -pmypw (WORKS)

John Spikowski
John@v360v.com

How to repeat:
See above

Suggested fix:
allow space after -p option
[2 Jan 2005 11:04] Sergei Golubchik
It cannot be done.
The problem is password after -p is optional. Thus

    mysql -p xxx

means the password will be asked from the terminal, and xxx (just as "mysql xxx") is the database name.