如下:下面两个`sid`=1列后的`sname` 列 我都有中文在数据库里,为啥在这不显示出来,直接空着的?
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 30
Server version: 5.1.30-community MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> use test
Database changed
mysql> select*from stu;
+------+--------+
| sid  | sname  |
+------+--------+
| 1    |    |
| 1    |    |
| NULL | NULL   |
| 2    | asd    |
+------+--------+
4 rows in set (0.00 sec)mysql>

解决方案 »

  1.   

    set nams gbk;
    select*from stu;试试
      

  2.   


    gbk试了下不行,utf8也试了一下,也不行0.0
      

  3.   

    1、my.cny 修改 添加character_set_server=utf8 
    2、CREATE DATABASE 库名CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
    3、CREATE TABLE表名(...) ENGINE= MYISAM CHARACTER SET utf8 ;
      

  4.   

    先看看表的字符集的吧
    show create table 看一下,是不是表的字符集本身就不支持中文。然后再看数据库的字符集。最后再查看你使用的终端的字符集。
      

  5.   

    windows就是毒瘤,在控制台上不支持utf-8,所以没办法,要么用gbk,要就就是用图形界面