mysql template - prefix is sometimes broke

8 posts / 0 new
Last post
#1 Fri, 01/09/2009 - 07:56
DeanHall

mysql template - prefix is sometimes broke

Virtualmin 3.64 GPL

I use a mysql template with the following Default database name = ${PREFIX}db Prefix for additional databases = ${PREFIX)

for domains with TLD of .com this works fine and I get a database of example_db and additional databases have a prefix of example_

If the domain TLD is .org then I get a database of mydomain_org_db and additional databases have a prefix of mydomain_org_

There are only 5 domains on my server, no conflicts with domain names.

Am I seeing a bug or is this expected behavior (and why)?

Thanks.

Fri, 01/09/2009 - 09:06
Joe
Joe's picture

This is expected behavior - the PREFIX is always unique between virtual servers, so if you already have example.com (with prefix 'example') and then add example.org, it's prefix will be example.org to avoid a clash.

If this bothers you, it is possible to manually set the prefix on the virtual server creation form, in the 'Advanced options' section.

--

Check out the forum guidelines!

Fri, 01/09/2009 - 12:16 (Reply to #2)
DeanHall

There was no conflict. nothing even remotely close. This was only the 5th virtual server added. The other four are not conflicts. I just created yet another domain, testing.org. The name has never been used on this server. Same problem.
Dean-

Fri, 01/09/2009 - 12:19 (Reply to #3)
Joe
Joe's picture

Was there perhaps an existing Unix user or group called 'mydomain' ? If so, Virtualmin will set the domain's admin user to be mydomain.org, and will also set the prefix to match.

--

Check out the forum guidelines!

Fri, 01/09/2009 - 12:22 (Reply to #4)
DeanHall

no. and the test i just run, creating yet another virtual domain with a name that has never been used anywhere on my server, had the same symptom.
-dean-

Fri, 01/09/2009 - 12:34 (Reply to #5)
Joe
Joe's picture

I just remembered there is another option that controls the prefix - if you go to System Settings -> Module Config -> Defaults for new domains, the 'Domain name style in username' field being set to 'Full domain name' will force use of the longer prefix.

--

Check out the forum guidelines!

Fri, 01/09/2009 - 13:19 (Reply to #6)
DeanHall

You nailed it. My testing was flawed. When I saw the unexpected behavior, I didn't go back and test the domain names similar to the already installed ones, so I assumed (yes I know what that makes me) it was a problem of the TLD. I also forgot I had tweaked the configs. dumb.

Thanks for your help, sorry to waste bandwidth with cockpit error.
-dean-

Fri, 01/09/2009 - 13:32 (Reply to #7)
Joe
Joe's picture

No problems - glad you got it worked out!

--

Check out the forum guidelines!

Topic locked