Bug #30549 Running mysqlmanager --passwd fails if runn from a 5250 terminal
Submitted: 21 Aug 2007 22:06 Modified: 14 Aug 2008 4:12
Reporter: Omer Barnir (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.42 OS:Other (i5/OS PASE)
Assigned to: Paul DuBois CPU Architecture:Any

[21 Aug 2007 22:06] Omer Barnir
Using mysqlmanager to generate/add to a password file using the --passwd fails if the command is used directly from an IBM 5250 terminal.

The problem is related to the use of get_password() that does not behave as expected and does not prompt for the password:
> ./mysqlmanager --passwd
  Creating record for new user.
  Enter user name:
> aaa


as soon as the enter is hit after the user name, the line is generated as if the password was entered empty.

The problem is not observed if connecting to the pas environment using ssh.

There is workaround to the problem (suggested by IBM) of using the mysql client to generate the entry as follows:

./mysql --user=root -B --skip-column-name -e 'select concat("username",":",password("password"));'

or alternatively, wrap the following line in a shell script such as:

$ add_passwd <user> <password>

where the script itself will include the following:

echo "select concat(\"$1\",\":\",password(\"$2\"))" | ./mysql -B --skip-column-names  -u root

How to repeat:
Log into a PASE environment using (5250 terminal) using telnet
- at the prompt type 'qsh'
- cd to the mysql bin directory
- execute ./mysqlmanager --passwd

Suggested fix:
For now document the 'workaround'
[14 Aug 2008 4:11] Paul DuBois
Reclassifying as Documentation bug and assigning to myself.
[14 Aug 2008 4:12] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.