MariaDB社区

标题: mysql5字符集采用gbk,DOS下建库后,DOS下正常显示,winxp资源管理器下乱码怎么解决? [打印本页]

作者: wggiyt    时间: 2013-1-20 12:50
标题: mysql5字符集采用gbk,DOS下建库后,DOS下正常显示,winxp资源管理器下乱码怎么解决?
帮我看看下面的问题:(嘿嘿,不会上传截图,麻烦亲们直接看百度知道的链接)
http://zhidao.baidu.com/question/516008939?quesup2&oldq=1

D:\MySQL5.0\bin>mysql -uroot

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2

Server version: 5.0.87-community-nt-log MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> show variables like "%char%";

+--------------------------+-----------------------------+

| Variable_name            | Value                       |

+--------------------------+-----------------------------+

| character_set_client     | gbk                         |

| character_set_connection | gbk                         |

| character_set_database   | gbk                         |

| character_set_filesystem | binary                      |

| character_set_results    | gbk                         |

| character_set_server     | gbk                         |

| character_set_system     | utf8                        |

| character_sets_dir       | D:\MySQL5.0\share\charsets\ |

+--------------------------+-----------------------------+

8 rows in set (0.00 sec)


mysql> show variables like "%coll%";

+----------------------+----------------+

| Variable_name        | Value          |

+----------------------+----------------+

| collation_connection | gbk_chinese_ci |

| collation_database   | gbk_chinese_ci |

| collation_server     | gbk_chinese_ci |

+----------------------+----------------+

3 rows in set (0.00 sec)


mysql> create database `湖北荆门`;

Query OK, 1 row affected (0.01 sec)


mysql> show databases;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| test               |

| 湖北荆门           |

+--------------------+

4 rows in set (0.02 sec)


winxp资源管理器的截图:(嘿嘿,不会上传截图,麻烦亲们直接看百度知道的链接)

http://zhidao.baidu.com/question/516008939?quesup2&oldq=1






作者: kider    时间: 2013-1-21 09:58
链接中,有人已经回答你了。
我的建议是:最好数据库名不要用中文。
作者: wggiyt    时间: 2013-1-22 10:07
我知道数据库名最好不要用中文名的。
问题是 3.23里面是正常的,为什么5.0就不行了。
作者: kider    时间: 2013-1-22 12:19
别纠结这个了,一辈子也用不到的东西...




欢迎光临 MariaDB社区 (http://123.56.88.72/) Powered by Discuz! X3.2