情况~首先,在myphpadmin 里面界面插入数据在linux下命令查询如下
+-----------+------+------+------+--------+------------+-------------+
| CountryID | Ios2 | Iso3 | name | iphone | simplified | traditional |
+-----------+------+------+------+--------+------------+-------------+
|         0           |             |            |             |        | ???        | ???         |
|         1           |             |           |              |        | ??         | ??          |
|         1           |             |           |               |        | 阿阿     | 方法      |
+-----------+------+------+------+--------+------------+-------------+前面2个是我在myphpadmin   web界面插入的~~  在web界面下是没乱码问题~  并且能查找出来
最后1个是我在linux的命令插入的  现在问题出现了~ 
1。在phpmyadmin 界面下插入的数据无法在linux下的命令下查找出来 并且乱码
2。在linux的命令模式下插入的数据 在phpmyadmin界面下无法查找出来,并且显示为乱码
3。求解决能通用!  至于为什么要用phpmyadmin 是有特别的原因~不是我用~表结构
CountryID int(11)            
Ios2 char(3) utf8_general_ci not null              
Iso3 char(3) utf8_general_ci not null              
name varchar(100) utf8_general_ci not null              
iphone char(3) utf8_general_ci not null              
simplified char(50) utf8_general_ci not null              
traditional char(50) utf8_general_ci not null

解决方案 »

  1.   

    字符集设置的问题。楼主可以先看一下这个贴子。http://blog.csdn.net/ACMAIN_CHM/archive/2009/05/12/4174186.aspx
    MySQL 中文显示乱码
      

  2.   

    show variables like 'char%'; 
      

  3.   

    这有两篇完整的总结字符集的文章,
    MySQL中的字符集涵义及使用方法总结(一)
    http://hi.baidu.com/hexiong/blog/item/16a10ad1b9a015d3572c84b4.htmlMySQL中的字符集涵义及使用方法总结(二)
    http://hi.baidu.com/hexiong/blog/item/a7d5653813ac762397ddd8b5.html
      

  4.   


    是这样的~~ simplified  插入的是简体
     traditional 插入的是繁体我刚弄这个 有点很不明白~  我把数据库设置成UTF8的了~  并且按照你上面的修改了~还是一样的~  2边插的数据 在另外一边看就乱码
      

  5.   


    +--------------------------+----------------------------+
    | 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     | latin1                     |
    | character_set_system     | utf8                       |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+