在mysql5.1版本中设置字符集
[mysqld]

default-character-set=utf8

在mysql-5.5中设置字符集

[mysqld]

character_set_server=utf8