Bug #65117 Username should not exceed 16 characters long
Submitted: 26 Apr 2012 14:55 Modified: 2 Nov 2012 5:03
Reporter: Javier Rivera Zavala Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S4 (Feature request)
Version: OS:Windows
Assigned to: CPU Architecture:Any

[26 Apr 2012 14:55] Javier Rivera Zavala
Description:
Acording to: 
http://dev.mysql.com/doc/refman/5.5/en/user-names.html
MySQL usernames should be 16 characters long or less.

GUI Installer and console installers allow the user to input names longer than the limit.

How to repeat:
GUI side
Run the GUI Installer. 
Select Server only Type installation.
When on the screen MySQL Server Configuration 2/3, click add a user.
On the popup, type a username longer than 16 characters long, type a password and click ok.

The GUI should not allow to click ok if the username is longer than the limit.

CLI side
Open the Intaller console 
(Win7x64: 
C:\Program Files (x86)\MySQL\MySQL Installer\MySQLInstallerConsole.exe)
Install server and create users like:
MySQLInstallerConsole.exe --action=install --product=mysql-server-5.5-win32 --config=mysql-server-5.5-win32:passwd=root --user=mysql-server-5.5-win32:name=bob01234567890123456789;host=localhost;role=DBA;password=P4$$w0rdExampl3
No error message will be shown, but the user account won't exist.
(you can verify installing WB and searching the previously supplied credentials at the CLI, they won't exist).

Suggested fix:
GUI:
Make sure the user types usernames of valid length before allowing him to click OK.
CLI:
Detect invalid username, before processing any further.
Maybe add a validation of username length and display user help when exceeded.
[2 Nov 2012 5:03] Philip Olson
This bug has been fixed, and here's the changelog entry:

  While creating a user, the Installer will now warn the user if a
  username exceeds 16 characters in length.

Thank you for the bug report.