日期:2014-05-16  浏览次数:20892 次

navicat中文乱码的问题???
用本机用navicat连接局域网内一台mysql服务器,,,显示字符集设置,,结果集中包含中文全显示为?????????
show variables like "%char%";
+--------------------------+--------------------------------------+
| Variable_name | Value |
+--------------------------+--------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\Server_Core\MySQL\share\charsets\ |
+--------------------------+--------------------------------------+

在这台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 | C:\Server_Core\MySQL\share\charsets\ |
+--------------------------+--------------------------------------+

my.ini

[client]
port=3306
character_set_client=utf8
character_set_connection=utf8
character_set_results=utf8



怎么设置一下,用navicat查询结果包含中文不乱码

------解决方案--------------------
SQL code
set names 'UTF8'

------解决方案--------------------
在navicat上执行上面的命令后再进行查询看看
------解决方案--------------------
在本机上
set names 'UTF8'
在新字符集下重新插入记录
------解决方案--------------------
客户端的配置文件 编码格式配置下

-------------------------+--------------------------------------+ 
| Variable_name | Value | 
+--------------------------+--------------------------------------+ 
| character_set_client | latin1 | 
| character_set_connection | latin1 | 
| character_set_database | utf8 | 
| character_set_filesystem | binary | 
| character_set_results | latin1 | 
| character_set_server | utf8 | 
| character_set_system | utf8 | 
| character_sets_dir | C:\Server_Core\MySQL\share\charsets\ | 
看起来你的编码格式不统一
------解决方案--------------------
应该是客户端的配置问题,字符集没有统一