mysql 中文亂碼

保證client,connection,database,results編碼一致。mysql

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\ |sql

在my.ini中設置默認編碼格式編碼

[mysqld]
character-set-server=gbkserver

相關文章
相關標籤/搜索