n98-magerun icon indicating copy to clipboard operation
n98-magerun copied to clipboard

mysql/mysqldump cli command charset

Open mklooss opened this issue 11 years ago • 5 comments

this method miss utf8 as default charset

--default-character-set=utf8

a workaround is to add .my.cnf to user dir

mklooss avatar Nov 28 '13 09:11 mklooss

Thanks. I will check this next week.

cmuench avatar Dec 01 '13 16:12 cmuench

@mklooss I checked the MySQL manual.

http://dev.mysql.com/doc/refman/5.1/de/mysqldump.html

If no character set is specified, mysqldump uses utf8, and earlier versions use latin1.

This is valid for all 5.x releases. So i think it's not really necessary to add the option to db:dump and db:import comands.

cmuench avatar Dec 07 '13 20:12 cmuench

yep thats corrent, but when the provider changed the default values in my.cnf so your got these settings :)

we had the problem on a df.eu managed server

mklooss avatar Dec 07 '13 20:12 mklooss

I have this problem right now on a df.eu managed server too. @mklooss do you have a solution for this?

bambamboole avatar Apr 21 '18 12:04 bambamboole

Just take a look at the documention of mysql/mariadb: https://mariadb.com/kb/en/library/configuring-mariadb-with-mycnf/

you should set the default charset in the ~/.my.cnf file

mklooss avatar Apr 21 '18 13:04 mklooss

With MySQL 8 the people also want to have utf8mb4. We do not want to change the behavious in Magerun. This should be managed in the MySQL config for client. In the background we are using mysqldump which can be configured with defaults as well.

cmuench avatar Dec 16 '23 14:12 cmuench