Wrong character encoding – Latin-1, UTF-8 data in MySQL

Julian Klewes, digital brand strategist, published this article 2 years ago

Written by Julian Klewes

27 y/o Digital Native with a cum laude degree in International Business, Management, Marketing and Controlling, with hands on experience in both Agency and Corporate worlds.

Interesting, tell me more about JK

no image, sorry

This article saved me quite some headache – also this is the cleanest solution of all. For several other workarounds, see Stackoverflow here.

The solution that works was:

mysqldump -h (your ip) -u (your username) -p  --opt --quote-names

--skip-set-charset --default-character-set=latin1 (your db name) > (your db name)-dump.sql
mysql -h (your ip) -u (your username) -p

--default-character-set=utf8 (your db name) < (your db name)-dump.sql

delete the brackets, dont fill in the brackets (your ip) = for instance