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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.