MySQL save/restore: an example of what not to do

Link: http://tanguy.ortolo.eu/blog/article62/mysql-encoding

In brief: mysqldump and mysql have different default encoding character set.

It's better to change default encoding with the “–default-character-set=charset_name” .

Example:

$ mysqldump --default-character-set=LC_CTYPE -u root -p --all-databases > all-databases.sql
...
$ mysql --default-character-set=LC_CTYPE -u root -p < all-databases.sql

Now, I understand some issue I have encountered , some years ago … :-\