这段时间在研究mysql,顺利在win7上安装成功后,进入控制台,查询表中的数据,数据中有中文汉字的就会乱码,网上看了下解决的办法,解决了问题,特记下来以后查阅使用
mysql> show variables like 'character_set%';
+--------------------------+--------------------------------------+
| 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 | C:\MySQL\share\charsets\ |
+--------------------------+--------------------------------------+
mysql> set character_set_results='gbk'; //将控制台输出结果编码改为gbk
成功解决问题!