Username length restriction in different MySQL environments
The maximum length for a user name in MySQL does depend on the version, as stated in the manual:


  MySQL user names can be up to 32 characters long (16 characters before MySQL 5.7.8).