These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for how to change maximum length of MySQL user from 16 characters to 32? on the new forum.
i am trying to host both mydomain.com and mydomain.net where mydomain is 15 characters long. virtualmin will not let the second domain be set up- stating that MySQL already has a use called mydomain. - it is truncating the com and/or net off. the last time i had to set up a fresh system was 7-8 years ago, and i have forgotten where i made the last piece of correction. i have changed the user field in the db database- but it appears that some where else the user name is truncated before it attempts to enter user name to db.
i am at a loss to find this last missing step. keith
Hi, you can't change the limit. From http://dev.mysql.com/doc/refman/5.5/en/user-names.html
MySQL user names can be up to 16 characters long. Operating system user names, because they are completely unrelated to MySQL user names, may be of a different maximum length. For example, Unix user names typically are limited to eight characters. Warning
The limit on MySQL user name length is hard-coded in the MySQL servers and clients, and trying to circumvent it by modifying the definitions of the tables in the mysql database does not work.
I seem to remember in MySQL 5.0 and prior, if you try to connect from client using a long username, the MySQL server takes only the first 16 characters and the login process works. Since MySQL 5.1 the login fails if you send more than 16 characters in username from the client (php code, mysql cli, phpmyadmin login form...).
You can try providing a personalized username when setting up the second domain, instead mydomain.net you can use adminmydomain.net or something like that.
Santi
This probably has solution now. New verisons of MySQL support 32 chars (MariaDB even 80 chars)
Creapix
how do we change MySQL user from 16 characters to 80?
I'm on mobile now and I don't remember it exactly but it is possible to change it by adding parameter to config file. New verisons support this option. When we were solving this problem there wasn't this parameter option.
Creapix
Here it is. Edit /etc/webmin/virtual-server/config and adding the line mysql_user_size=80
Creapix