Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

1 Answer 1

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.