Katz Ueno
Posted on June 9, 2021
Learning from mistake.
mysqldump
doesn't respect database's collation, but mysql client.
Check your mysqldump default character set by typing
mysqldump --help | grep default-character-set
You always want to add --default-character-set
option
Example
mysqldump -h {$host} -u {$db_username} --password="{$db_password}" --default-character-set=utf8mb4 --single-transaction {$db_name} > {$SQL_file_name}
--single-transition
option is my preferences for the database which mainly uses InnoDB
💖 💪 🙅 🚩
Katz Ueno
Posted on June 9, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.