mysql 中文乱码

保证client,connection,database,results编码一致。

mysql> show variables like '%character%';
+--------------------------+---------------------------
------+
| Variable_name | Value
|
+--------------------------+---------------------------
------+
| character_set_client | gbk
|
| character_set_connection | gbk
|
| character_set_database | gbk
|
| character_set_filesystem | binary
|
| character_set_results | gbk
|
| character_set_server | gbk
|
| character_set_system | utf8
|
| character_sets_dir | D:\mysql-5.6.17-win32\mysq
sets\ |

在my.ini中设置默认编码格式

[mysqld]
character-set-server=gbk

 

posted on 2018-02-28 18:00  明月几时有25  阅读(107)  评论(0编辑  收藏  举报