Skip to content

Instantly share code, notes, and snippets.

View masterix21's full-sized avatar
❤️
Ready to help

Luca Longo masterix21

❤️
Ready to help
View GitHub Profile

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