Bug #37722 mysqlmanager example in documentation is incorrect
Submitted: 28 Jun 2008 18:09 Modified: 4 Aug 2008 19:28
Reporter: Patrick Galbraith Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Documentation Severity:S5 (Performance)
Version:5.0, 5.1 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[28 Jun 2008 18:09] Patrick Galbraith
Description:
Hi!

There is no --passwd argument for mysqlmanager. There is an --adduser argument which provides the functionality you are exemplifying in this page.

How to repeat:
my:/usr/local/mysql/var/data1 root# /usr/local/mysql/libexec/mysqlmanager --passwd > /usr/local/mysql/var/.mysqlmanager.password
/usr/local/mysql/libexec/mysqlmanager: unknown option '--passwd'

Suggested fix:
change example to show something like this:

my:/usr/local/mysql/var/data1 root# /usr/local/mysql/libexec/mysqlmanager --add-user
[20008/2684407808] [08/06/28 14:05:29] [INFO] IM: started.
[20008/2684407808] [08/06/28 14:05:29] [INFO] Loading config file 'my.cnf'...
Enter user name: patg
[20008/2684407808] [08/06/28 14:05:32] [INFO] Loading the password database...
[20008/2684407808] [08/06/28 14:05:32] [INFO] The password database loaded successfully.
Enter password: 
Re-type password: 
[20008/2684407808] [08/06/28 14:05:38] [INFO] IM: finished.
[28 Jun 2008 18:47] Valeriy Kravchuk
Thank you for a problem report. Please, be more specific about the version/documentation page you are complaining about. http://dev.mysql.com/doc/refman/5.1/en/instance-manager-command-options.html does NOT have any problematic example of --passwd, for example. While http://dev.mysql.com/doc/refman/5.0/en/instance-manager-command-options.html describes --passwd option that is supported by 5.0.x.
[28 Jun 2008 19:06] Patrick Galbraith
Valeriy, 

The page is:

http://dev.mysql.com/doc/refman/5.1/en/instance-manager-security-passwords.html

And it shows the example:

shell> mysqlmanager --passwd >> /etc/mysqlmanager.passwd
Creating record for new user.
Enter user name: mike
Enter password: mikepass
Re-type password: mikepass

Kind regards,

Patrick

PS. I notice this is soon to be deprecated. I just noticed this because I'm writing a book and thought maybe I should cover mysqlmanager, which I've decided not to since it'll be removed and by the time the book is out, it'll be removed.
[29 Jun 2008 17:33] Valeriy Kravchuk
Thank you for a bug report.
[4 Aug 2008 19:28] Paul DuBois
The example shown is said in the manual to apply before MySQL 5.1.12. Later in the page, this text appears:

"
Beginning with MySQL 5.1.12, the --passwd option is renamed to --print-password-line and there are several other options for managing user accounts from the command line.
"

And then an example that applies for 5.1.12 and up is given.