Welcome, Guest
Please Login or Register.
Lost Password?
mediawiki: change db table prefix (1 viewing)
Post Reply

TOPIC: mediawiki: change db table prefix

#15424
kato (User)
Posts: 130
graphgraph
mediawiki: change db table prefix 2008/08/06 05:26  
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.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15425
kato (User)
Posts: 130
graphgraph
Re:mediawiki: change db table prefix 2008/08/06 05:28  
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?
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15426
kato (User)
Posts: 130
graphgraph
Re:mediawiki: change db table prefix 2008/08/06 05:36  
I also noted what might be a bug in this linee
Code:

[ "DBschema", "mysql4" ],



Doesn't look like that will work with postgres installs.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15435
kato (User)
Posts: 130
graphgraph
Re:mediawiki: change db table prefix 2008/08/06 09:27  
I've attached the updated mediawiki.pl script (which also includes the fix for the versioning issue with php.
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15436
kato (User)
Posts: 130
graphgraph
Re:mediawiki: change db table prefix 2008/08/06 09:28  
Err.. tried to anyways
File Attachment:
File name: mediawiki.txt
File size:8127 bytes
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15582
JamieCameron (Admin)
Posts: 374
graphgraph
Re:mediawiki: change db table prefix 2008/08/09 14:42  
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.
  The administrator has disabled public write access.
#15670
kato (User)
Posts: 130
graphgraph
Re:mediawiki: change db table prefix 2008/08/14 08:04  
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...
Operating system CentOS Linux 4.6
Webmin version 1.420
Virtualmin version 3.60 (Pro)
Kernel and CPU Linux 2.6.9-67.0.22.ELsmp on i686
  The administrator has disabled public write access.
#15686
JamieCameron (Admin)
Posts: 374
graphgraph
Re:mediawiki: change db table prefix 2008/08/14 14:48  
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 :-)
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.