Trouble with back up and restore mediawiki database
Posted by:
Kraml Liu
Date: December 12, 2005 12:27AM
Hi guys. I'm struggling with mysqldump and restore mediawiki database. The wiki I setup has Chinese characters as the page title and in the content. I use mysqldump to dump the wiki database into a sql file, then restore it by mysql < wiki.sql.
However, after the restore there are some artitle mysteriously become no content within.(yeah, its title in the parent page becomes a red link, just as other non-written page, and when I click it wiki told me I'm creating a new page.....). But, only some of the pages are affeted, some not. Both good and bad pages are having Chinese characters as page title. When I view the wiki "All pages" list, those bad pages are having there title turned into weird characters, not Chinese, not English, just symbols, squares, circles etc etc. So I suspect it's related to character set issue, but I tried several settings without success.
BTW: use the copy database feature in phpMyAdmin has no problem, it gives me a new db with everything fine, so I think myself definitely missed something....
Here is my system&mysql settings:
OS: RHAS4 update2
OS Locale: zh_CN.UTF-8
MySQL version: 4.1.12-3, the rpms come with RHAS4 u2
mysql character set: (copy from phpMyAdmin)
character set client utf8
character set connection utf8
character set database utf8
character set results utf8
character set server utf8
character set system utf8
(So seems everything in my setup is in utf8)
Command used to backup:
mysqldump wiki -r wiki.sql
Command used to restore:
mysql -u root -p newwiki < wiki.sql
Any suggestions are highly appreciated!