Description:
16 Char username limitation is very annoying if you are running a hosting site with domain names as usernames.
Please add a configure option to ./configure to set USERNAME_LENGTH in:
include/mysql_com.h:#define USERNAME_LENGTH 16
and also in the privileges_table script ALTER TABLE `user` MODIFY `User` VARCHAR(valueFromConfigure) BINARY
I've tested this approach with success:
set USERNAME_LENGTH to 20, recompiled, altered the privilges table to VARCHAR(20) BINARY
made new db test_db, grant:
mysql> GRANT ALL ON `test_db`.* TO '123456789012345678'@'localhost' IDENTIFIED BY 'my_pass';
Query OK, 0 rows affected (0.00 sec)
fileserver ~ # mysql -u 123456789012345678 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.25
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
So this seems to work. i'm not sure if anything else is involved, but would be nice to have this as a configure option since 16 is really short, and i don't see a reasoning for it in the manual either.
How to repeat:
GRANT ALL ON `test_db`.* TO '123456789012345678'@'localhost' IDENTIFIED BY 'my_pass';
on a normal installation ->
ERROR 1145: The host or user argument to GRANT is too long
Suggested fix:
mentioned above