I have an old mediawiki installation, which used to run on mysql 4 and mediawiki 1.6 (ish). I dumped the database and moved to a new machine, with mysql 5 and mediawiki 1.14. When I import the data to the new wiki, I get a choice between mysql 5 binary, mysql 5 UTF-8 and backwards-compatible mysql 4 UTF-8. If I choose either of the mysql 5 options, the install produces a warning that the database is still using the mysql 4 schema, and all non-ascii characters are corrupt. If I choose the mysql 4 option, everything seems to work fine, but I get a dire warning that using mysqldump may break all non-ascii characters.
I need to use mysqldump to back up the wiki. So -- how can I upgrade my mysql4 database to one of the new mysql 5 schemata?
Thanks,
Ben
Quoth Ben Willmore On Wednesday, March 25, 2009 6:07 AM:
I need to use mysqldump to back up the wiki. So -- how can I upgrade my mysql4 database to one of the new mysql 5 schemata? Ben
Perhaps this question is better asked of the MySQL people?
Good luck! -Courtney
Ben Willmore wrote:
I need to use mysqldump to back up the wiki. So -- how can I upgrade my mysql4 database to one of the new mysql 5 schemata?
Thanks,
Ben
You can use mysqldump with mysql 4 schema. You just need to avoid mysqld dump 'helpfully' converting the charset. Call it with the option --default-character-set=latin1 (the data is in fact UTF-8 but we make msyql think it's latin1, it's the charset conversions what break it)
http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki#Character_set
Hello Ben,
I need to use mysqldump to back up the wiki. So -- how can I upgrade my mysql4 database to one of the new mysql 5 schemata?
We have few mysql5 servers running around, that got imported from mysql4 data.
Though we do a bit different trick (we start server with --default- character-set=binary, then load binary data - mysqldump can give you a binary dump too) - essentially it is quite similar to the binary schema inside MediaWiki package.
So, you either have to do binary dump if you want to reimport into properly built MySQL5 instance, or you can use Special:Export / other xml dumping tools.
The problem with standard mysql4.1+ mysqldump is that it dumps data as 'utf8' by default - to conversions might be done on fields that were tagged as 'latin1' before.
Best regards,
mediawiki-l@lists.wikimedia.org