原来5.1之前,可以在/etc/my.cnf里面加default-character-set=utf8就OK,
到5.5.9之后,,好像原来那个配置不管用了,,改成了另一个参数
character-set-server = utf8
这样就OK了,
mysql> show variables like '%char%';
+--------------------------+----------------------------------+
| Variable_name | Value |
+--------------------------+----------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql/share/charsets/ |
+--------------------------+----------------------------------+
8 rows in set (0.00 sec)
阅读(958) | 评论(0) | 转发(0) |