mediawiki: change db table prefix

8 posts / 0 new
Last post
#1 Wed, 08/06/2008 - 05:26
kato

mediawiki: change db table prefix

Most of the server owners on our virtualmin install are limited to 1 database.

Naturally, I had a user who wants to create 2 instances of mediawiki. This isn't possible because the installer assumes the table prefix is always "mw_".

It would be nice to specify the table prefix, of course, so users limited to 1 db could have multiple instances of mediawiki.

I'd be willing to take a crack at the script if you like. It doesn't look too tough to add another config parm to the perl. The only thing that I'd need help with is figuring out what the current db prefix is (so we can make the conflict check work).

Also, it would be useful to have a brief overview of how this gets run. It's clear it gets included from somehwere, and I might want to check out some of those subroutines if I run into a bug.

Wed, 08/06/2008 - 05:28
kato

Actually, I think I can fix this right now, I don't think I need to know the current prefix, based on how find_database_table() is used.

Would you gents be interested in having me send the script updates somewhere to go back into virtualmin?

Wed, 08/06/2008 - 05:36 (Reply to #2)
kato

I also noted what might be a bug in this linee
[code:1] [ "DBschema", "mysql4" ],[/code:1]

Doesn't look like that will work with postgres installs.

Wed, 08/06/2008 - 09:27 (Reply to #3)
kato

I've attached the updated mediawiki.pl script (which also includes the fix for the versioning issue with php.

Wed, 08/06/2008 - 09:28 (Reply to #4)
kato

Err.. tried to anyways [file name=mediawiki.txt size=8127]http://www.virtualmin.com/components/com_fireboard/uploaded/files/mediaw...

Sat, 08/09/2008 - 14:42 (Reply to #5)
Joe
Joe's picture

Hi kato,

This looks like a good patch, but I'd have to make a similar change in all scripts to be consistent :-)

Personally, I'd recommend allowing domain owners to create more databases, so that a separate one can be used for used for each mediawiki install. Databases are pretty cheap in MySQL - I know sites that have tens of thousands of databases on a single system.

--

Check out the forum guidelines!

Thu, 08/14/2008 - 08:04 (Reply to #6)
kato

While this isn't a large worry or a major headache, it does cramp our plans for hosting a bit, so let me explain our perspective.

We'd like to offer a couple packages, and for the 'simple' package to feature a single database, single domain, and 3 email accounts. We think that beginners may be off-put by the idea of managing multiple databases and sites. Additionally, we don't want to offer too much bang for too little buck--we'd like them to upgrade for more advanced services.

So we'd have to add a constraint that any script only be installed once per client, which works but seems a bit unintuitive--they should be able to put whatever they want into their space, as long as they have space.

Again, not a major selling point, but it is awkward to decide how we'll word this to make it sound professional. On the flip side, it would encourage upgrading to an advanced package...

Thu, 08/14/2008 - 14:48 (Reply to #7)
Joe
Joe's picture

You might want to consider limits on disk space rather than the number of databases - in a standard Virtualmin install, the space used by DBs counts against domains' quotas, so you can relatively safely let users create a large number of DBs.

Just as long as they don't reach MySQL's hard-coded upper limit of 32k that is :-)

--

Check out the forum guidelines!

Topic locked