Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I increase username length of PhpMyAdmin/mysql user account?

How can I increase username length of PhpMyAdmin/mysql user account?

Edit : Sorry for my mistake. Its PhpMyAdmin/mysql user account not any mysql table.

Answer : http://dev.mysql.com/doc/refman/4.1/en/user-names.html According to this article I should not do this.

like image 221
Gaurav Avatar asked Feb 14 '11 11:02

Gaurav


1 Answers

   ALTER TABLE t1 MODIFY col1 VARCHAR(2000);

refer: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html


If it's MySQL's User table, then login as root

mysql --user=root mysql -pPASSWORD
ALTER TABLE user MODIFY user CHAR(100);
commit;

THE ABOVE IS NOT RECOMMENDED

Thanks for the feedback. I have tried the above, and column user could be changed successfully. However, MySQL manual warns against it

MySQL user names can be up to 16 characters long. Changing the maximum length is not supported. If you try to change it, for example by changing the length of the User column in the mysql database tables, this will result in unpredictable behavior. (Altering privilege tables is not supported in any case.) Operating system user names might have a different maximum length. For example, Unix user names typically are limited to eight characters.

refer http://dev.mysql.com/doc/refman/4.1/en/user-names.html

Thanks @BoltClock for mentioning it.

like image 129
Nishant Avatar answered Sep 18 '22 11:09

Nishant