Description:
I see that the maximum length of MySQL user names was increased from 16 to 32 in MySQL 5.7.8.
Why was the increase limited to only 32 characters? The length of 32 characters is still too short. A much longer length would be preferable.
Please explain the reasons for the short user name length and consider increasing the length to a much larger length like 256 characters or even 1024 characters. Consider making the user name length configurable.
We use automation to create database clusters and want to create various application users (rw, ro, migration, maintenance, et al.) automatically based on the application and database names. Ideally, the length would be configurable with an understanding of the effect and/or limitations inherent in choosing different lengths.
This bug is not a duplicate of bug 3083. I see that bug 3083 requested increasing the length to 128 bytes and it was closed after the increase to 32 characters. Bug 3083 did not provide an explanation as to why a length of 32 characters was chosen.
How to repeat:
mysql> create user montymontymontymontymontymontymonty;
ERROR 1470 (HY000): String 'montymontymontymontymontymontymonty' is too long for user name (should be no longer than 32)
Suggested fix:
Increase the user name length to 1024 characters and/or make the length configurable.