Guido Holz asked how to adapt the database from mediawiki 1.2.6 to phase3, as there are
more tables and columns in
Phase 3 than in 1.2.x.
JeLuF replied: The install script updates the database.
Nope. Not always.
Despite considerable effort, I was unable to get the install script to work with an
existing 1.2.x database. The problem *may*
be to do with not having the right permissions. Or it may be something else entirely.
The only way that I have found to make the 1.3 install script work is as follows. I'll
spell it out in detail in case this is helpful to
others. (My hosting service provides all-bells-and-whistles GUI-based control panel, but
no shell access. If your arrangements
are similar, this may help.)
Unzip the 1.3.x into a folder. Rename it to something sensible, such as "wiki"
FTP that folder and all subfolders to your server. Leave LocalSettings.php strictly alone.
You can fix that stuff later.
Now, use your MySQL administration tool to create a new database, and to create a user
for that database. Give that user
all rights. You *must* create the database before running the install script, or the
installation will fail.
Now you can run the install script. Leave the root password at the very bottom of the form
BLANK. You don't need root
access via the WikiMedia install script as you have ALREADY created the new database, and
made yourself a user.
On completion of the install script, you now have a working wiki with no content.
If you are installing a version that uses the same database format as your previous
install (e.g., old install and new install are
both 1.2.4 - probably OK with any pair of 1.2.x versions), you can simply restore your
backup over the top of your brand-new
empty database and everything works fine. (You may have to hit SHIFT-RELOAD in your
browser to clear the caches before
it looks right).
If your backup is from 1.2.x and you have installed 1.3.x, then a restore will promptly
crash and burn. (Trust me: I've tried it.)
You need to transform the database to the new format first! At present, this does not seem
to be possible for non-SQL gurus.
There is a script at maintenance/archives/convertdb.php but the text of it reads:
This script is obsolete!
It is retained in the source here in case some of its
code might be useful for ad-hoc conversion tasks, but it is
not maintained and probably won't even work as is
The README says that they probably need to be run from the command line - so if you
don't have shell access, they
probably won't work even if they do still work in theory.
For my 1.2.4 to 1.3 beta 2 upgrade, I used brute force. I backed up the existing database,
installed a second copy of 1.2.4 in
a test folder, restored the backup to there and checked that everything still worked. Then
I used cut & paste to recreate the
articles. That took maybe a couple of hours. Obviously, it wouldn't be practical if
you have a larger database. Equally
obviously, I lost the page histories (which didn't matter in this case) and the users.
I created new users with the previous
usernames and temporary passwords, recreated their user page as if I was them, then hacked
MediaWiki:Passwordremindertext and hit the "Email me a new password" button in
Special:Userlogin to mail them a new
password. (Again, not something you could do with a working full-scale wiki, but OK for
this test install, where I know all the
users and have their email addresses.)
Anyway, the long and the short of it is that a script to upgrade the database would be a
HUGE improvement. It should be
capable of running *either* from the command line *or* from a web interface. I lack the
expertise to write it myself, but I'd be
happy to help with testing it before general release.
Tannin (twilson_a_ncable;net;au)
Tannin (Tony Wilson)