Mysqldump encoding

If you experience false characters in your mysqldump, you might want to try to set the encoding specifically. Example with latin1:

mysqldump -u [USER] -p --opt --skip-set-charset --default-character-set=latin1 [DATABASE_NAME] > [OUTPUT_FILE_NAME].sql

Check different encoding settings in mysql when using a specific database: show variables like 'char%';

More info and tips: https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql

Last modified
2021-08-06
Tags