tisdag 22 juni 2010

Set UTF8 as default in MySQL

Hi! If you want mysql to use utf8 as default when you create databases and tabels, add the following text to /etc/mysql/my.cnf

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

[client]
default-character-set=utf8

Found the solution at http://notes.timeghost.net/2008/10/utf-8-and-mycnf.html

Inga kommentarer:

Skicka en kommentar