How to backup utf8mb4 with a mysqldump
-
Hi,
Since 4.2 upgraded the database tables with utf8mb4, I’m caring about the proper management of my databases. Currently, I’m backing up my db’s with a shell script, started by a cronjob every night. It looks like ths:
mysqldump -u username -p "password" dbname > ./dbname.sql;
As mysqldump uses utf8 as a standard, but 4.2 changed to utf8mb4, I’m not sure, if it’s still the right way, or if I will loose any mb4-characters, because it was backed-up with utf8. Can anyboy tell, whether the default character set has to get changed to utf8mb4 like this:
mysqldump --default-character-set=utf8mb4 -u username -p "password" dbname > ./dbname.sql;
?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to backup utf8mb4 with a mysqldump’ is closed to new replies.