日期:2014-05-16 浏览次数:20637 次
通过设置Mysql的启动参数文件(一般为my.ini),加入或修改下面两行:
1. [mysqld]下的character-set-server=utf8
mysql> show variables like 'character%'; +--------------------------+--------------------------+ | 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 | D:\MySQL\share\charsets\ | +--------------------------+--------------------------+