Manual:Upgrading MySQL

From Linux Web Expert

Upgrading Mediawiki and Mysql in the same time

For example moving a server from SUSE Linux 9.0 to SUSE Linux 10.0.

The mysql version of SUSE Linux 9.0 doesn't allow Mediawiki 1.6, so it's not possible to update the 1.5.8 running version to 1.6. It was necessary to make a full move to a new SUSE Linux distribution. This should be the same for any move involving a mysql move.

so, first on the source computer backup the whole wiki database :

mysqldump -p wikidb > wikidb.sql

for me I needed to do this as root. then option -p made mysqladmin to call for the passwd (root mysql pass).

tar cvfz med_158.tgz mediawiki/

to have all the old files.

Then on the target computer, after moving the backup files :

mysql -p and mysql opens it's console
use wikidb
source wikidb.sql

But one must start from a clean mysql (no wikidb before, or delete it)

tar xfvz med_158.tgz

Test, it should work. Same mediawiki site but on the new computer (new mysql/php version).

Then overwrite the folder with the new 1.6.3 files.

For the sake of security, unpack the 1.6.x version elsewhere, in this version enter the root dir and delete the image dir, and the config dir then :

cp -a <1.6.x dir>/* <1.5.8 dir> 

After that you can delete the <1.6.x dir>.

In the new mediawiki root folder :

cp AdminSettings.exampl AdminSettings.php

This is the key part. It's mandatory to have the maintenance scripts run. In it replace "wikiuser" by root and set it password.

Run

php maintenance/update.php

and wait, then enjoy the new mediawiki 1.6.3.