如果更改字符集后,插数据入到字符集为GB2312的表时,出现自动关闭MYSQL连接和停止MYSQL服务的错误。那麽用下面的方法可以解决:(工具:MySQL Query Browser)右键选择Edit tableàTable Option将Collation下拉框里面的值选gb2312_bin然后保存,保存好再将该值选gb2312_chinese_ci,再保存。这样就可以解决该问题mysql> show variables like "%char%";
+--------------------------+----------------------------------------------------
-----+
| Variable_name | Value
+--------------------------+----------------------------------------------------
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database | utf8
|
| character_set_results | utf8
|
| character_set_server | utf8
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 4.1\share\chars
ets/ |
+--------------------------+----------------------------------------------------
mysql> show variables like "%colla%";
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)