MySQL user name is too long error


Apr 27, 2019
cPanel Access Level
Root Administrator
I just crated a new installation of WHM and I'm copying accounts from another cPanel installation. I am getting this message:

The system cannot grant privileges to the MySQL user “example_something” because of an error: (XID sqxnev) “example_something” is too long by 1 character. A MariaDB/MySQL username cannot exceed 16 characters.

I get the problem, and the solution is to address the too long name either before or after transfer. However, I'm confused about how this even happens. If cPanel does not allow user names that are longer than 16 characters, how did that user name get created in the first place? Is this a bug? I do recall some times in the past receiving a notice that my user name was too long. But I don't recall this in recent memory. Now it typically seems to accept any length (I've created many many cPanel accounts in my day), and I've thought: oh, I guess I can use longer names now. Cool!

Also, I'm wondering if there is a better solution than mucking around in the account and changing the user name in the application, etc. This is a fly in the ointment of the transfer process, which is so smooth and useful, and just wonderful.