Read more

MySQL Server and UTF-8 Defaults

Martin Straub
August 25, 2010Software engineer at makandra GmbH

Unless all MySQL server defaults are set to UTF-8, mysqldump encodes UTF-8 characters incorrectly and only outputs correct UTF-8 when you switch to Latin 1 (!). Also you need to setup charset and collation manually for each new database.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more

To prevent this, make sure your /etc/mysql/my.cnf looks like this:

default-character-set = utf8mb4
collation-server = utf8mb4_unicode_ci


After that do

sudo /etc/init.d/mysql restart
Posted by Martin Straub to makandra dev (2010-08-25 16:33)