Project

General

Profile

Actions

MySql Character set and collation

About setting the default character set and collation in Debian and Ubuntu

Not yet revised


(also see http://fun.kyco.de/2011/03/26/are-you-stuck-in-debian-mysql-charset-collation-hell)

Depending on the version of the mysql server you need to pick one of the following configutations and put it as utf8.cnf file to /etc/mysql/conf.d/

mysql version < 5.5.3:

[mysql]
# set the server character set is set to utf8
default-character-set = utf8
default-collation     = utf8_general_ci

mysql version >= 5.5.3:

[mysql]
# set the server character set is set to utf8
character_set_server  = utf8
collation_server      = utf8_general_ci

Updated by Andreas Müller almost 2 years ago · 8 revisions