I'm gradually moving up in the world of hosting from shared accounts with no shell access to (now) a VPS host with full control.
I would like to ask the philosophical question of whether using a table prefix like "mw_" is of any use later? I have pretty much full control of my box, can have as many MySQL databases as I like (including dev, test and live ones).
It would seem to me that having completely separate databases (as opposed to differently named tables) is the way to go for me but can anyone help out with practical experience. Up to now I've used a prefix of mw_ and I could continue with that or just stop.
Gadget Doctor
Am Dienstag, den 05.02.2008, 13:44 +0200 schrieb The Gadget Doctor:
It would seem to me that having completely separate databases (as opposed to differently named tables) is the way to go for me but can anyone help out with practical experience. Up to now I've used a prefix of mw_ and I could continue with that or just stop.
If you should ever move back down in the world of hosting, having kept the prefixes would save you the renaming step. Other than that, I don't see a reason to keep the prefixes. Nor do I see a philosophical reason to remove them if you could use the time for having a good coffee instead. :)
~ Kilian
I would like to ask the philosophical question of whether using a table prefix like "mw_" is of any use later? I have pretty much full control of my box, can have as many MySQL databases as I like (including dev, test and live ones).
Currently all maintenance tasks are hard-coded with the standard table names. I've run into this and been bitten by it far too many times.
If you want to use table prefixes (which I must do in my install; 50+ wikis using 1 single 30gb+ database), you have to hand-edit the maintenance scripts to compensate for that.
It would seem to me that having completely separate databases (as opposed to differently named tables) is the way to go for me but can anyone help out with practical experience. Up to now I've used a prefix of mw_ and I could continue with that or just stop.
It all depends on your specific application, and how you intend on designing it. There is no one, hard-fast rule for how it "Should Be Done(tm)".
On Feb 5, 2008 2:46 PM, David A. Desrosiers desrod@gnu-designs.com wrote:
Currently all maintenance tasks are hard-coded with the standard table names. I've run into this and been bitten by it far too many times.
This would seem to be a killer point that I haven't spotted anywhere in the docs (and a bit of a failing!)
Right now I can't seem to get any maintenance scripts to run as I get the following failure:
PHP Fatal error: require_once(): Failed opening required 'counter.php' (include_path='.:') in /var/www/vhosts/xxxxxxx/httpdocs/w/maintenance/update.php on line 2
I'm scouring the web and the archives right now but if anyone knows the answer.....
On 2/5/08, David A. Desrosiers desrod@gnu-designs.com wrote:
Currently all maintenance tasks are hard-coded with the standard table names. I've run into this and been bitten by it far too many times.
Are you sure about this? I've never had that problem (if I'm running a script for installing an extension or the like, then there's sometimes a bit of tweaking needed, but the scripts in /maintenance seem to automatically recognize the prefix my wiki uses).
On 2/5/08, The Gadget Doctor mediawiki@thegadgetdoctor.com wrote:
Right now I can't seem to get any maintenance scripts to run as I get the following failure:
PHP Fatal error: require_once(): Failed opening required 'counter.php' (include_path='.:') in /var/www/vhosts/xxxxxxx/httpdocs/w/maintenance/update.php on line 2
I'm scouring the web and the archives right now but if anyone knows the answer.....
Is the path through which it's trying to include update.php correct? (It could be looking in the wrong place if you have something rewritten, I suppose.) Do you have AdminSettings.php filled out? Do you have PHP 5.x (if you're using MediaWiki 1.7+)?
David A. Desrosiers wrote:
I would like to ask the philosophical question of whether using a table prefix like "mw_" is of any use later? I have pretty much full control of my box, can have as many MySQL databases as I like (including dev, test and live ones).
Currently all maintenance tasks are hard-coded with the standard table names. I've run into this and been bitten by it far too many times.
All the updaters run the raw SQL files through a filter to add the table prefixes and table type options.
Unless you're manually running them, there's no need to edit anything.
-- brion vibber (brion @ wikimedia.org)
On 05/02/2008, The Gadget Doctor mediawiki@thegadgetdoctor.com wrote:
I would like to ask the philosophical question of whether using a table prefix like "mw_" is of any use later? I have pretty much full control of my box, can have as many MySQL databases as I like (including dev, test and live ones). It would seem to me that having completely separate databases (as opposed to differently named tables) is the way to go for me but can anyone help out with practical experience. Up to now I've used a prefix of mw_ and I could continue with that or just stop.
We use one database, but a different prefix for each wiki in our farm. I'm the one who set it all up, there's several Unix admins here who may have to do tasks up to dev level on the wikis.
The only hazard to this approach that I can see is those occasions when one is fiddling with things at the MySQL command line, and forgetting to double-check with a SELECT before running an UPDATE that you've got the right line of the right table.
- d.
mediawiki-l@lists.wikimedia.org