mysql> show variables like '%character%';
+--------------------------+-------------------------------------------+
| Variable_name            | Value                                     |
+--------------------------+-------------------------------------------+
| character_set_client     | latin1                                    |
| character_set_connection | latin1                                    |
| character_set_database   | utf8                                      |
| character_set_results    | latin1                                    |
| character_set_server     | utf8                                      |
| character_set_system     | utf8                                      |
| character_sets_dir       | C:\MySQL\MySQL Server 5.0\share\charsets\ |
+--------------------------+-------------------------------------------+

mysql> SHOW VARIABLES LIKE '%collation%' ;
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | latin1_swedish_ci |
| collation_database   | utf8_general_ci   |
| collation_server     | utf8_general_ci   |
+----------------------+-------------------+
重新读取又出现乱码:
mysql> select * from employee;
+-------------+-----------+------------+------------+--
| employee_id | last_name | first_name | birth      | s
+-------------+-----------+------------+------------+--
|          12 | ?         | ??         | 1978-12-11 | f
|          13 | ?         | ??         | 1978-12-11 | f
|          14 | ?         | ??         | 1978-12-11 | f
|          15 | ?         | ??         | 1978-12-11 | f
|          16 | ?         | ??         | 1978-12-11 | f
|          17 | ?         | ??         | 1978-12-11 | f
+-------------+-----------+------------+------------+--
所以我们需要在客户端设置系统能识别中文的编码gbk并没有保存到my.ini文件中。所以要修改my.ini文件

在[mysql]段加入一下代码改成:default-character-set=gbk 这样设置就得到保存了。
重启就可以了。
mysql> show variables like '%character%';
+--------------------------+----------------
| Variable_name            | Value
+--------------------------+----------------
| character_set_client     | gbk
| character_set_connection | gbk
| character_set_database   | utf8
| character_set_results    | gbk
| character_set_server     | utf8
| character_set_system     | utf8
| character_sets_dir       | C:\MySQL\MySQL
+--------------------------+----------------
mysql> SHOW VARIABLES LIKE '%collation%' ;
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | gbk_chinese_ci  |
| collation_database   | utf8_general_ci |
| collation_server     | utf8_general_ci |
+----------------------+-----------------+