Bug #5724 'mysqladmin password' should be allowed to prompt for password
Submitted: 24 Sep 2004 0:14 Modified: 26 Nov 2009 16:09
Reporter: Harrison Fisk
Status: Closed
Category:Client Severity:S4 (Feature request)
Version:4.1/5.0 OS:Any
Assigned to: Jim Winstead Target Version:
Tags: Contribution
Triage: Needs Triage: D5 (Feature request)

[24 Sep 2004 0:14] Harrison Fisk
Description:
mysqladmin run with the 'password' option should allow to prompt for the password similar
to the 'passwd' unix command.  Currently there isn't anyway, using the command-line
clients, to set a password without having it display on screen.

How to repeat:
shell> mysqladmin password
mysqladmin: Too few arguments to change password

Have it prompt for password instead.

Suggested fix:
Please see attached patch against 4.1 to allow for this.
[24 Sep 2004 0:14] Harrison Fisk
patch against mysqladmin 4.1 to force it to prompt for a password if not given one

Attachment: password_prompt.diff (application/octet-stream, text), 1.79 KiB.

[2 Nov 2004 23:00] Christian Hammers
Can be merged with #6343 which also tells that giving a password on command line
is a security problem as it is readable via /proc/<pid>/cmdline for anyone for a short
time.
[20 May 2008 2:40] Eric Bergen
I ran across this while catching up on email. Is there any chance this will ever be
integrated?
[8 Feb 2009 18:34] Valeriy Kravchuk
Bug #27243 was marked as a duplicate of this one.
[30 Apr 2009 0:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/73069

2697 Jim Winstead	2009-04-29
      Add support for being prompted for new passwords by mysqladmin instead of
      specifying them on the command line. (Bug #5724, patch by Harrison Fisk)
      modified:
        client/mysqladmin.cc
[15 May 2009 22:10] Jim Winstead
Queued to 6.0-bugteam.
[17 Jun 2009 21:27] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090616183122-chjzbaa30qopdra9) (version
source revid:jimw@mysql.com-20090515200739-34pgxbd2ww6ak23r) (merge vers: 6.0.12-alpha)
(pib:11)
[26 Jun 2009 20:19] Paul DuBois
Noted in 5.4.4 changelog.

mysqladmin now allows the password value to be omitted following the
password command. In this case, mysqladmin prompts for the password
value, which enables you to avoid specifying the password on the
command line. Omitting the password value should be done only if 
password is the final command on the mysqladmin command line.
Otherwise, the next argument is taken as the password.
[12 Aug 2009 23:43] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 0:41] Paul DuBois
Ignore previous comment about 5.4.2.
[11 Nov 2009 17:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/90114

2927 Magne Mahre	2009-11-11
      Bug #5724 'mysqladmin password' should be allowed to prompt for password
      
      Add support for being prompted for new passwords by mysqladmin instead of
      specifying them on the command line. (Bug #5724, patch by Harrison Fisk)
[11 Nov 2009 17:19] Magne Mæhre
Backported to 5.6.0
   6.0-codebase revid: 2617.42.1
[20 Nov 2009 13:54] Bugs System
Pushed into 5.6.0-beta (revid:davi.arnaut@sun.com-20091119234808-xbjpkwaxjt5x5c0b)
(version source revid:davi.arnaut@sun.com-20091119234808-xbjpkwaxjt5x5c0b) (merge vers:
5.6.0-beta) (pib:13)
[20 Nov 2009 13:57] Bugs System
Pushed into 6.0.14-alpha (revid:kostja@sun.com-20091120124947-yi6h2jbgw0kbciwm) (version
source revid:kostja@sun.com-20091119222407-5a7cjlhw06trtxnf) (merge vers: 6.0.14-alpha)
(pib:13)
[26 Nov 2009 16:09] Paul DuBois
Noted in 5.6.0, 6.0.14 changelogs.