Dear all,
I am trying to migrate an old but important Wiki from its current server to a new machine.
The old machine is a RH Linux running MW 1.5.3 with MySQL 3.23. The new machine is VMware Linux running with MySQL 5.1.
My mysql usernames are not identical on the two machines.
I would prefer not to modify/upgrade the installation on the old machine. I can mysqldump the old database from the new machine with (--host=<old machine>) and read it into the new database. But I can get neither a copy of my old wiki nor a fresh install of 1.17 to work with these tables. E.g. when I run update.php I get a MySQL error:
1005: Can't create table 'wikidb.transcache' (errno: 121) (localhost)
Can someone enlighten me as to the correct sequence of steps that would be expected to work for such a migration? Or am I even thinking in the right direction?
Thanks! Boris
After much trial and error, I finally succeeded. Here is the process, for comment (and list archive).
Step 1: create a dump of the old wiki tables MySQL 5 will not work with the tables from a mysqldump that was bundled with MySQL3. Fortunately mysqldump can run on a remote machine. My new machine has MySQL5 installed so I created the dump with the following command on the new machine:
mysqldump --host=<old.machine> -u <userName> -p <databaseName> > <file>.sql
Step 2: create a fresh installation of MW 1.17 on the new machine (Follow the instructions; if you previously had any tables in the database, DROP them). Download and place your LocalSettings.php You should get to the stage where you have a functioning, but empty MW 1.17
Problem? In my installation, I encountered a problem that the installer had "remembered" the previous installation (where was that information stored? I had untared a fresh download!), then was not able to CREATE tables. Fortunately tables can be created manually: mysql -u <userName> -p <databaseName> < maintenance/tables.sql
Step 3: upload your old tables, the ones you have previously dumped mysql -u <userName> -p <databaseName> < <file>.sql
Step 4: run update php maintenance/update.php
Initially I got an error RENAME TABLE `ipblocks_newunique` TO `ipblocks` returned error "1050: Table ... already exists
But when I checked, that table did not exist and when I reran update.php it went through.
AND THEN my Wiki was again live.
Step 5: clean up Indices have to be rebuilt, especially if $wgHashedUploadDirectory was used.
php maintenance/rebuildall.php
That should be all. Boris
On 2011-11-08, at 2:21 PM, Boris Steipe wrote:
Dear all,
I am trying to migrate an old but important Wiki from its current server to a new machine.
The old machine is a RH Linux running MW 1.5.3 with MySQL 3.23. The new machine is VMware Linux running with MySQL 5.1.
My mysql usernames are not identical on the two machines.
I would prefer not to modify/upgrade the installation on the old machine. I can mysqldump the old database from the new machine with (--host=<old machine>) and read it into the new database. But I can get neither a copy of my old wiki nor a fresh install of 1.17 to work with these tables. E.g. when I run update.php I get a MySQL error:
1005: Can't create table 'wikidb.transcache' (errno: 121) (localhost)
Can someone enlighten me as to the correct sequence of steps that would be expected to work for such a migration? Or am I even thinking in the right direction?
Thanks! Boris
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org