Bug #5724 'mysqladmin password' should be allowed to prompt for password
Submitted: 23 Sep 2004 22:14 Modified: 6 Mar 2010 18:18
Reporter: Harrison Fisk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:4.1/5.0 OS:Any
Assigned to: Jim Winstead CPU Architecture:Any
Tags: Contribution

[23 Sep 2004 22: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.
[23 Sep 2004 22: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 22: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 0:40] Eric Bergen
I ran across this while catching up on email. Is there any chance this will ever be integrated?
[8 Feb 2009 17:34] Valeriy Kravchuk
Bug #27243 was marked as a duplicate of this one.
[29 Apr 2009 22: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 20:10] Jim Winstead
Queued to 6.0-bugteam.
[17 Jun 2009 19: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 18: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 21:43] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[14 Aug 2009 22:41] Paul DuBois
Ignore previous comment about 5.4.2.
[11 Nov 2009 16: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 16:19] Magne Mæhre
Backported to 5.6.0
   6.0-codebase revid: 2617.42.1
[20 Nov 2009 12: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 12: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 15:09] Paul DuBois
Noted in 5.6.0, 6.0.14 changelogs.
[6 Mar 2010 11:01] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20091120154107-6awpq04plug2xlri) (merge vers: 5.6.0-beta) (pib:16)
[6 Mar 2010 18:18] Paul DuBois
Noted 5.6.0 changelog entry to 5.5.3.