我以前在装Mysql的时候忘记设置编码方式是utf8了,等到我建好表的时候我才发现错误,我只好查查怎么改,我忘记那个时候是怎么查的了,反正没有找到答案,我就问问老师,老师说:重装!无奈,就只好重装了,现在又遇到这个问题,当然不是我的机上上的,我是吃一堑长一智,一个错误犯过一次就不能再犯第二次,我查了查,原来是需要修改一下配置文件中的default-character-set=utf8就行了,我重新设计了编码方式,改成Latin1的,然后显示一下编码的方式是:
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
-----+
| character_set_client | latin1
|
| character_set_connection | latin1
|
| character_set_database | utf8
|
| character_set_filesystem | binary
|
| character_set_results | latin1
|
| character_set_server | utf8
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.1\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)
我再改回来显示的就是这样了:
| Variable_name | Value
|
+--------------------------+----------------------------------------------------
-----+
| character_set_client | utf8
|
| character_set_connection | utf8
|
| character_set_database | utf8
|
| character_set_filesystem | binary
|
| character_set_results | utf8
|
| character_set_server | utf8
|
| character_set_system | utf8
|
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.1\share\chars
ets\ |
+--------------------------+----------------------------------------------------
-----+
8 rows in set (0.00 sec)
现在我还有点疑问就是那个character_set_database、character_set_server 为什么总是utf8呢,希望有人知道的告诉一声,谢谢了