ReLoad

Thierry Jaouen ~ WikiBlog
"Rien à foutre d'être lu, tant que je peux me relire."

Outils pour utilisateurs

Outils du site


blog:2012:07:17:mysql_save_restore_an_example_of_what_not_to_do

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.

  • mysqldump use UTF8
  • mysql use Latin-1

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 … :-\

blog/2012/07/17/mysql_save_restore_an_example_of_what_not_to_do.txt · Dernière modification : 2012/07/17 08:35 de thierry