Skip to content

Instantly share code, notes, and snippets.

View cazaa's full-sized avatar
🏠
Working from home

Casper André Casse cazaa

🏠
Working from home
  • KILROY International A/S
  • Silkeborg, Denmark
  • X @cassecasper
View GitHub Profile
@ntamvl
ntamvl / dumping-and-importing-from-to-mysql-in-an-utf-8-safe-way.md
Last active May 28, 2024 08:54
Dumping and importing from/to MySQL in an UTF-8 safe way

Dumping and importing from/to MySQL in an UTF-8 safe way

In a nutshell: to avoid your shell character set from messing with imports, use -r to export and SOURCE when importing. Dumping safely

# Do not do this, since it might screw up encoding
mysqldump -uroot -p database > utf8.dump # this is bad