Bug #4005 Administrator always backs up using UTF8 encoding
Submitted: 4 Jun 2004 14:52 Modified: 4 Jun 2004 15:46
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.4b OS:Linux (Linux)
Assigned to: Bugs System CPU Architecture:Any

[4 Jun 2004 14:52] Hartmut Holzgraefe
Administrator always uses UTF8 encoding for Backups regardless
of default-charcter-set settings in the [client] section of my.cnf,
but does not add a SET comment into the dump file to ensure that
the right character set is used on a restore like mysqldump does

How to repeat:

  default-character-set = latin1

create a backup with mysql Administrator, then use mysql command 
line tool to read it in:

  mysql dbname < Adminstrator_Backup_file.sql

any non-ASCII characters are now mangled :(

forcing mysql to treat the input as utf8 instead of the default
latin1 setting helps:

  mysql --default-character-set=utf8 < Administrator_Backup_file.sql

Suggested fix:
Administrator should make sure to add SET comments to the created 
dump file as mysqladmin does:


default-character-set awareness as in mysqldump would be a great plus
[4 Jun 2004 15:45] Ulrich Bayer
Hi Helmut,

I have recently changed the backup/restore code of the Mysql Administrator. Unfortunately the linux-version 1.0.4b of the Administrator does not use this code. We will make a bugfix release next week. The current linux-version will also not restore the sql-file correctly.

In the new version files backed up by the Administrator will still be in UTF-8. This is the best behavior for mysql 4.1 (and above) servers. For mysql 4.0 servers it would make sense for honor the default-server-charset but it would break the current design of our implementation and thus we don't want to change it.
However the new Administrator version can restore sql-files in all encodings. 
I close this bug although the Linux-GUI still has to be updated.
[4 Jun 2004 15:46] Ulrich Bayer
I wrote your name wrong - sorry!