Prepending db names

6 posts / 0 new
Last post
#1 Mon, 12/10/2007 - 09:27
beetle

Prepending db names

I have been trying to set up a template so that when a database is created, it prepends the name with the user's user name. I have been able to get this to work when Virtualmin creates the default database, but not when that user creates his or her own databases. I have entered "${USER}_" into the box beside of "Prefix for additional databases," but it doesn't work.

BTW, the documentation goes line by line how to set up a template, but skips right over this setting. Can somebody look into that?

Tue, 12/11/2007 - 18:20
beetle

Am I to just figure this out on my own? Is there noone here who knows the answer? Maybe that's why it was left out of the documentation. It must work on the Pro version, can't somebody just tell me what to do to make the opensource version work?

Wed, 12/12/2007 - 00:16
Joe
Joe's picture

This feature is the same in Virtualmin GPL and Professional. There is no conspiracy. If it doesn't work in GPL, it doesn't work in Pro, and filing a bug is the appropriate action. ;-)

I believe underscore is explicitly prohibited (for some reason I don't recall, but it's a good reason). But, it ought to complain about the problem rather than silently not working. Do you get an error?

But, wait a minute...the default is the behavior you describe (without you having to setup anything in the Server Templates). How are your users creating databases? Are they using Webmin/Virtualmin? (That's the only place we can enforce this. If you're allowing arbitrary database creation in MySQL, there's nothing we can do about the names they choose.)

--

Check out the forum guidelines!

Thu, 12/13/2007 - 16:48 (Reply to #3)
beetle

OK, I've done a little more research on this and found that if I set up the template to prefix additional databases with the username_, and create a database using the "Edit Databases" button on the vertual server page while logged in as root, it actually does prepend the database name with the username. When I log out and log back into Webmin with a user's login, and then try to create a database, the name of the database is not prepended at all.

Any ideas how to correct this, or do I need to ask the Webmin guys?

Thu, 12/13/2007 - 23:31 (Reply to #4)
Joe
Joe's picture

Sounds like a bug. File it in the tracker, and we'll see what Jamie has to say about it.

<div class='quote'>Any ideas how to correct this, or do I need to ask the Webmin guys? </div>

What &quot;Webmin guys&quot; would that be? Jamie and Joe, perhaps? (Hint: We are the Webmin guys. Jamie mostly.) ;-)

--

Check out the forum guidelines!

Fri, 12/14/2007 - 04:04 (Reply to #5)
beetle

Sorry, I'm new to Webmin/Virtualmin so I didn't know. I will file the bug forthwith. I'll just tell my customers to prepend the db names manually for now.

Thanks much for the help.

Topic locked