MySQL Username and Database Creation for Similar Domains


I am relatively new to Virtualmin and am hoping someone might be able to help with a problem I am experiencing with MySQL database creations for new sites.

I have a need to create virtual sites for several groups of similar domains: Eg.,, The 1st site creation is successful, however an additional site fails with the error "Failed to create virtual server : A MySQL database called new_domain_com or user called already exists".

I believe I have traced the problem to MySQL not being able to create the user as the Fully Qualified Domain Name is more than 16 characters long, which is the MySQL limit on usernames. With this in mind, I have not found anywhere where I can specifically/manually configure the MySQL user for each domain (only the database name).

Any suggestions or ideas on this would be greatly appreciated.


What about using a custom username upon creation? I am still using the GPL version at the moment, but I would imagine Pro has the same feature

Yes you can specify a custom Unix Admin username, but this is then automatically used for the MySQL user as well.

It would be nice to leave some of the Unix usernames as they are (and being more than 15 characters long), and to just modify the MySQL username (which is mostly hidden and ‘under-the-hood’) to get past the MySQL issue.

I guess I need to submit a feature request!


Hey guys,

Yeah, Virtualmin ought to be a bit smarter about this issue. I’ll go file a bug about it.

Here it is, so you can follow the progress on it: