Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using MySQL 5.1.58 on Debian Sqeeze and I'm trying to restore the dump of a database. Once it is restored I noticed that all the accented chars had become other chars as ù or è: completely different.

Looking in the dump I've seen that the problem is not at importing, but at exporting, becouse the strange chars were in the dump.

I exported that dump from another installation of MySQL (5.5) on ArchLinux. I tried also to use the argument --default-character-set=8tf8 in mysqldump, but it did not work.

Thank you in advance.

share|improve this question

migrated from Sep 11 '11 at 23:18

This question came from our site for professional and enthusiast programmers.

This is a common issue with mysqldump. Instead of using utf8 as the default encoding, use latin1. Also, you can use -N (which will specify SET NAMES) so that the encoded text will not be re-encoded by mysql. I.e.:

mysqldump -u username -p --default-character-set=latin1 -N database > backup.sql
mysql -u username -p --default-character-set=latin1 database < backup.sql


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.