进入命令行模式,
如果MySQL数据库已经安装好,可以使用下列SQL命令查看MySQL当前的字符集设置:
mysql> show variables like 'character_set_%';
+--------------------------+--------------------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | gb2312 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | D:wamp2.5inmysqlmysql5.6.17sharecharsets |
+--------------------------+--------------------------------------------------+
依次执行:
set character_set_client =gb2312;
set character_set_connection =gb2312;
set character_set_database =gb2312;
set character_set_results =gb2312;
set character_set_server =gb2312;
问题解决!