MySQL Username issues


i switched from Ubuntu 8.04 Virtualmin GPL 3.79 to 10.04 Virtualmin GPL 3.79 on a new Server. When i create a domain like, the mysqlusername was the domainname.
Now on Ubuntu 10.04 the username is limited to 16 characters, which ist the mysqldefault.
I’ve restored all templates from the old server. But how do i manage to get the old behavior from 8.04 back?


Hrm, are you certain that Ubuntu 8.04 allowed for longer MySQL usernames?

There’s some info on that issue mentioned here on the MySQL site:

Of interest, they mention:

MySQL user names can be up to 16 characters long.


The limit on MySQL user name length is hard-coded in the MySQL servers and clients

I had thought that most/all distros had that 16 character limit. Though, if that’s not the case, I’m not sure how I’d go about modifying it :slight_smile:


I got the exact same issue under Debian 6.0.1

Like ‘get.the.MaX’, my old setup under Debian 5.0 allowed to login using > 16 characters long username even if the one saved in ‘mysql.user’ table was truncated to 16 characters.

If I create ‘’ virtual server under my Debian 5.0 setup, the MySQL user is ‘more-than-sixtee’ but I can login using:

mysql --user=more-than-sixtee --password=tristanleboss
mysql --user=more-than-sixteen --password=tristanleboss
mysql --user=more-than-sixteenabcdefghijklmnopqrstuvwxyz --password=tristanleboss

Because, under Debian 5.0, MySQL 5.0 ignores anything after the 16th characters.

But, under Debian 6.0, MySQL 5.1 no longer ignores this garbage and you can only login using:

mysql --user=more-than-sixtee --password=tristanleboss

I opened a bug issue: