Techminded

MySQL and Unicode

Unicode era is here many times ago and nowdays you're getting well setupded MySQL on widely used Linux distributions or Windows systems out-of-box or easily. But there can be collisions with it's usage or non-usage when your distribution has enterprise level of quality like RedHat/CentOS. To no get swedish locate tables, you should add the following few lines to MySQL's configuration file called my.cnf (it cant be accessible by /etc/my.cnf or /etc/mysql/my.cnf or by find or locate search programms:):

[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
init-connect='SET NAMES utf8;'
collation-server=utf8_general_ci
[mysql]
default-character-set=utf8

Don't forget to restart the server for changes to take effect. You can check your configuration by the following statement executed in db client:

SHOW VARIABLES LIKE 'character_set%';

Links

I used the following article (Russian) for reference:

http://broderix.blogspot.com/2009/06/mysql5-default-character-collation.html

Comments

30-08-2013 02:14: Alexey Oblozhko
test