【前提】
winxpsp3
mysql5.1
【步骤】
1.进入MySQL Command Line Client;
2.命令:
mysql> show variables like 'character%';
+--------------------------+---------------------------------------------------------+
| Variable_name | Value
|
+--------------------------+---------------------------------------------------------+
| character_set_client | latin1
|
| character_set_connection | latin1
|
| character_set_database | latin1
|
| character_set_filesystem | binary
|
| character_set_results | latin1
|
| character_set_server | latin1
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.1\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.00 sec)
mysql> set names 'gbk';
Query OK, 0 rows affected (0.02 sec)
mysql> show variables like 'character%';
+--------------------------+---------------------------------------------------------+
| Variable_name | Value
|
+--------------------------+---------------------------------------------------------+
| character_set_client | gbk
|
| character_set_connection | gbk
|
| character_set_database | latin1
|
| character_set_filesystem | binary
|
| character_set_results | gbk
|
| character_set_server