We are trying to upgrade our MediaWiki software. According to Manual:Upgrading -> UPGRADE -> Manual:Backing_up_a_wiki, we are supposed to backup the database with:
mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
When we run the command with our parameters and --default-character-set=utf-8
:
$ sudo mysqldump -h localhost -u XXX -p YYY --default-character-set=utf-8 ZZZ >
backup.sql
mysqldump: Character set 'utf-8' is not a compiled character set and is not spec
ified in the '/usr/share/mysql/charsets/Index.xml' file
Checking Index.xml
appears to show utf-8
is available. UTF-8
is specifically called out by Manual:$wgDBTableOptions.
$ cat /usr/share/mysql/charsets/Index.xml | grep -B 3 -i 'utf-8'
...
<charset name="utf8">
<family>Unicode</family>
<description>UTF-8 Unicode</description>
<alias>utf-8</alias>
...
We tried both UTF-8
and utf-8
as specified by Manual:$wgDBTableOptions.
I have a couple of questions. First, can we omit --default-character-set
since its not working as expected? Second, if we have to use --default-character-set
, then what is used to specify UTF-8
?
A third, related question is, can we forgo mysqldump
all-together by taking the wiki and database offline and then making a physical copy of the database? I am happy to make a copy of the physical database for a restore; and I really don't care much for using tools that cause more trouble than they solve.
If the third item is a viable option, then what is the physical database file that needs to be copied?