Submitted by sgrayban on Wed, 09/16/2009 - 11:17
So there are 2 domains with the same name but 1 is for english and the other for swiss german.
One is .com and the other is .ch - For the .com we enabled mysql and when we try to enable it for the .ch we get a error that there is already a database by that name because both names are common to the TLD.
Follow ?
If such a error happens VM should ask for a new name to use instead of refusing to enable mysql. I know you can set it so that a default database isn't created but this isn't the point here.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Wed, 09/16/2009 - 13:39 Comment #1
Virtualmin should already handle this, by using DB names like foo for foo.com , and foo_ch for foo.ch.
What database names did it pick and try in your case?
Submitted by sgrayban on Wed, 09/16/2009 - 13:48 Comment #2
It's a user name error....
Failed to modify server : A MySQL user named open-source-host already exists
Submitted by JamieCameron on Wed, 09/16/2009 - 16:29 Comment #3
Ok, so it is really a username clash. Don't the .com and .ch domains have a different admin usernames though? Because that is what determines the MySQL username.
Submitted by sgrayban on Wed, 09/16/2009 - 18:38 Comment #4
Both are different...
Administration username open-source-hosting.ch Administration group open-source-hosting.ch
Administration username open-source-hosting.com Administration group open-source-hosting.com
Submitted by JamieCameron on Wed, 09/16/2009 - 19:08 Comment #5
Ok, I see the problem now .. MySQL has a 16-character limit on usernames, and open-source-hosting.ch and open-source-hosting.com are both the same when truncated to 16 characters :-(
Normally this isn't an issue, as domains like example.com and example.net are typically owned by the same login (one is a sub-server of the other), and so share the same MySQL login.
However, there is a quick work-around - edit the file under /etc/webmin/virtual-server/domains/ for the server without MySQL enabled, and add a line like :
mysql_user=someothername
Then re-try enabling the MySQL feature.
Submitted by sgrayban on Wed, 09/16/2009 - 19:52 Comment #6
Ok that worked.. Guess you will need to create a new input line to ask for a new username when this happens ?
Submitted by JamieCameron on Thu, 09/17/2009 - 18:52 Comment #7
Yes, I will do that.
Submitted by Issues on Fri, 10/02/2009 - 09:19 Comment #8
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by lewisjenkins on Tue, 10/06/2009 - 17:21 Comment #9
I have just had the same problem, I think.
bankhousebooks.co.uk already exists
Tried to create bankhousebooks.com as a seperate virtual server, and got an error :
mysql user bankhousebooks.c already exists
Couldn't find a way around it :(
Submitted by lewisjenkins on Tue, 10/06/2009 - 17:22 Comment #10
Submitted by JamieCameron on Tue, 10/06/2009 - 17:49 Comment #11
lewisjenkins - The work-around is to select a different admin username on the domain creation form, one which doesn't have the same first 16 characters as one of your existing domains.
Does that help?
Submitted by lewisjenkins on Thu, 10/08/2009 - 10:16 Comment #12
Cool... thanks!
Submitted by JamieCameron on Thu, 10/08/2009 - 11:21 Comment #13
Submitted by Issues on Thu, 10/22/2009 - 23:19 Comment #14
Automatically closed -- issue fixed for 2 weeks with no activity.