其中my.cnf文件是:
[mysql]
default-character-set=gbk(控制连接的字符集,character_set_client
character_set_connection
character_set_results,三个参数的字符集将都是gbk)
.........
[mysqld]
..........
character-set-server=gbk(控制服务器的字符集)
mysql> show global variables like 'character%';(查看字符集的变量)
+--------------------------+----------------------------------------------------
-----+
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
-----+
| character_set_client | gbk(客户端字符集gbk)
|
| character_set_connection | gbk(连接字符集gbk)
|
| character_set_database | gbk(数据库的字符集gbk)
|
| character_set_filesystem | binary
|
| character_set_results | gbk(返回的结果字符集位gbk)
|
| character_set_server | gbk(服务器的字符集gbk)
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.5\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)
阅读(440) | 评论(0) | 转发(0) |