# Identify: MTI1OTU2NjE3NCw2LjAuMCxjdXN0b20sc2hlbGwsMQ==
# <?exit();?>
 
 #------------------------------------------------
-- Server version 5.0.26-Comsenz-log
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;--
-- Table structure for table `cdb_members`
--DROP TABLE IF EXISTS `cdb_members`;
CREATE TABLE `cdb_members` (
  `uid` mediumint(8) unsigned NOT NULL auto_increment,
  `username` char(25) default NULL,
  `password` char(32) NOT NULL default '',
  `secques` char(8) NOT NULL default '',
  `gender` tinyint(1) NOT NULL default '0',
  `adminid` tinyint(1) NOT NULL default '0',
  `groupid` smallint(6) unsigned NOT NULL default '0',
  `groupexpiry` int(10) unsigned NOT NULL default '0',
  `extgroupids` char(20) NOT NULL default '',
  `regip` char(15) NOT NULL default '',
  `regdate` int(10) unsigned NOT NULL default '0',
  `lastip` char(15) NOT NULL default '',
  `lastvisit` int(10) unsigned NOT NULL default '0',
  `lastactivity` int(10) unsigned NOT NULL default '0',
  `lastpost` int(10) unsigned NOT NULL default '0',
  `posts` mediumint(8) unsigned NOT NULL default '0',
  `digestposts` smallint(6) unsigned NOT NULL default '0',
  `oltime` smallint(6) unsigned NOT NULL default '0',
  `pageviews` mediumint(8) unsigned NOT NULL default '0',
  `credits` int(10) NOT NULL default '0',
  `extcredits1` int(10) NOT NULL default '0',
  `extcredits2` int(10) NOT NULL default '0',
  `extcredits3` int(10) NOT NULL default '0',
  `extcredits4` int(10) NOT NULL default '0',
  `extcredits5` int(10) NOT NULL default '0',
  `extcredits6` int(10) NOT NULL default '0',
  `extcredits7` int(10) NOT NULL default '0',
  `extcredits8` int(10) NOT NULL default '0',
  `email` char(40) NOT NULL default '',
  `bday` date NOT NULL default '0000-00-00',
  `sigstatus` tinyint(1) NOT NULL default '0',
  `tpp` tinyint(3) unsigned NOT NULL default '0',
  `ppp` tinyint(3) unsigned NOT NULL default '0',
  `styleid` smallint(6) unsigned NOT NULL default '0',
  `dateformat` tinyint(1) NOT NULL default '0',
  `timeformat` tinyint(1) NOT NULL default '0',
  `pmsound` tinyint(1) NOT NULL default '0',
  `showemail` tinyint(1) NOT NULL default '0',
  `newsletter` tinyint(1) NOT NULL default '0',
  `invisible` tinyint(1) NOT NULL default '0',
  `timeoffset` char(4) NOT NULL default '',
  `newpm` tinyint(1) NOT NULL default '0',
  `accessmasks` tinyint(1) NOT NULL default '0',
  `editormode` tinyint(1) unsigned NOT NULL default '2',
  `customshow` tinyint(1) unsigned NOT NULL default '26',
  `xspacestatus` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`uid`),
  UNIQUE KEY `username` (`username`),
  KEY `email` (`email`),
  KEY `groupid` (`groupid`)
) ENGINE=MyISAM AUTO_INCREMENT=1828024 DEFAULT CHARSET=gbk;--
-- Dumping data for table `cdb_members`
--INSERT INTO `cdb_members` VALUES (1,'admin','3c35f354b7109db1bc5642e5c8c08dce','f7918493',0,1,1,0,'','hidden',1173125040,'222.247.56.11',1255168189,1258380437,1252045266,39,3,232,4561,1461,99990,999937,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,0,1,1,0,'9999',1,0,2,26,1);
INSERT INTO `cdb_members` VALUES (408,'狮子王','4fb19c672716f938fb7a0ca19a83f4cd','',0,0,10,0,'','222.240.143.34',1175345798,'58.44.34.147',1187565756,1175345798,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (493,'╅→尐傲孒℡','f31d0294d12237e4551c8ba152e7c9a7','',1,0,10,0,'','222.90.144.78',1175357089,'58.44.34.147',1187565756,1176348805,1175947246,2,0,2,0,14,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',1,0,0,1,0,2,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (494,'shl28','9a4454fe3ebf32cee875f2ab9f72f05c','',0,0,10,0,'','59.58.100.170',1175357096,'58.44.34.147',1187565756,1182748927,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (495,'448764614','07403992771e4f2e269cb691db383168','bcc126c2',1,0,10,0,'','218.88.211.205',1175357092,'58.44.34.147',1187565756,1175404716,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,30,15,1,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (496,'孟鑫','ef43504f874dc053612032c501geb883','',0,0,10,0,'','218.61.122.104',1175357094,'58.44.34.147',1187565756,1175406879,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (497,'牛奶稀释','f379eaf3c831b04de153469d1bec345e','',0,0,10,0,'','221.232.100.6',1175357102,'58.44.34.147',1187565756,1176289754,1175689094,1,0,2,0,13,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (498,'cat','86b4dfefeea6cd3f1e1c307183adcf3b','',0,0,10,0,'','60.164.206.6',1175357103,'58.44.34.147',1187565756,1176639007,1175363438,1,0,1,0,7,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (499,'天下为正','03cde451525ec26c1471bded35d50ad7','',0,0,10,0,'','124.147.134.46',1175357115,'125.70.59.173',1254131613,1254131100,0,0,0,1,0,6,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,1);
INSERT INTO `cdb_members` VALUES (509,'na1na32','9e8689966ff16824653f3cdc3090d450','',0,0,10,0,'','222.179.238.70',1175357143,'58.44.34.147',1187565756,1175357143,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (510,'superPC','efbd8baa56b5454d4d9a7ab40f761d41','ad9b14c5',1,0,10,0,'','60.24.198.187',1175357143,'58.44.34.147',1187565756,1175438792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','1985-07-03',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (511,'长久只音','658e9bedebe8915b24d8712516d6ed20','',0,0,10,0,'','60.17.52.43',1175357141,'58.44.34.147',1187565756,1177060204,1176901359,4,0,3,0,22,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (512,'小懒','670b14728ad9902aecba32e22fa4f6bd','',0,0,10,0,'','222.67.235.32',1175357141,'58.44.34.147',1187565756,1175756490,1175357636,1,0,0,0,1,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (513,'翼下风','a0e7c5416874b168392a0df9a643ae46','',0,0,11,0,'','60.168.5.30',1175357162,'58.44.34.147',1187565756,1177319641,1177074669,42,0,11,180,108,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (514,'祝家宝','2c2e9f5158a2503666ead534572c3268','',0,0,10,0,'','220.178.150.58',1175357163,'58.44.34.147',1187565756,1175956336,1175357638,1,0,1,0,7,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
INSERT INTO `cdb_members` VALUES (515,'◆ff.·筅苼','a52936521b7502091d9853a180f07b66','',0,0,10,0,'','220.168.29.148',1175357159,'58.44.34.147',1187565756,1175365312,1175365329,7,0,1,60,13,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;-- Dump completed on 2009-11-30  7:30:16
一导入我的数据库(source user.sql)
中文就变乱码了,这个是dz论坛用系统dump出来的数据库 字符集都是选择默认的。
附上我本机的mysql配置:mysql> show variables like 'char%';
+--------------------------+----------------------------------------------------
-----+
| Variable_name            | Value
     |
+--------------------------+----------------------------------------------------
-----+
| character_set_client     | gbk
     |
| character_set_connection | gbk
     |
| character_set_database   | gbk
     |
| character_set_results    | gbk
     |
| character_set_server     | latin1
     |
| character_set_system     | utf8
     |
| character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.0\share\chars
ets\ |
+--------------------------+----------------------------------------------------

解决方案 »

  1.   

    你的文件测试结果如下。mysql> show variables like 'char%';
    +--------------------------+--------------------------
    | Variable_name            | Value
    +--------------------------+--------------------------
    | character_set_client     | gbk
    | character_set_connection | gbk
    | character_set_database   | latin1
    | character_set_filesystem | binary
    | character_set_results    | gbk
    | character_set_server     | latin1
    | character_set_system     | utf8
    | character_sets_dir       | C:\Program Files\MySQL\My
    +--------------------------+--------------------------
    8 rows in set (0.00 sec)mysql>
    mysql> # Identify: MTI1OTU2NjE3NCw2LjAuMCxjdXN0b20sc2hlbGwsMQ==
    mysql> # <?exit();?>
    mysql>
    mysql>  #------------------------------------------------
    mysql> -- Server version    5.0.26-Comsenz-log
    mysql> /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
    Query OK, 0 rows affected (0.00 sec)mysql> /*!40103 SET TIME_ZONE='+00:00' */;
    Query OK, 0 rows affected (0.00 sec)mysql> /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
    Query OK, 0 rows affected (0.00 sec)mysql> /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CH
    ECKS=0 */;
    Query OK, 0 rows affected (0.00 sec)mysql> /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' *
    /;
    Query OK, 0 rows affected (0.00 sec)mysql> /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
    Query OK, 0 rows affected (0.00 sec)mysql>
    mysql> --
    mysql> -- Table structure for table `cdb_members`
    mysql> --
    mysql>
    mysql> DROP TABLE IF EXISTS `cdb_members`;
    Query OK, 0 rows affected (0.00 sec)mysql> CREATE TABLE `cdb_members` (
        ->   `uid` mediumint(8) unsigned NOT NULL auto_increment,
        ->   `username` char(25) default NULL,
        ->   `password` char(32) NOT NULL default '',
        ->   `secques` char(8) NOT NULL default '',
        ->   `gender` tinyint(1) NOT NULL default '0',
        ->   `adminid` tinyint(1) NOT NULL default '0',
        ->   `groupid` smallint(6) unsigned NOT NULL default '0',
        ->   `groupexpiry` int(10) unsigned NOT NULL default '0',
        ->   `extgroupids` char(20) NOT NULL default '',
        ->   `regip` char(15) NOT NULL default '',
        ->   `regdate` int(10) unsigned NOT NULL default '0',
        ->   `lastip` char(15) NOT NULL default '',
        ->   `lastvisit` int(10) unsigned NOT NULL default '0',
        ->   `lastactivity` int(10) unsigned NOT NULL default '0',
        ->   `lastpost` int(10) unsigned NOT NULL default '0',
        ->   `posts` mediumint(8) unsigned NOT NULL default '0',
        ->   `digestposts` smallint(6) unsigned NOT NULL default '0',
        ->   `oltime` smallint(6) unsigned NOT NULL default '0',
        ->   `pageviews` mediumint(8) unsigned NOT NULL default '0',
        ->   `credits` int(10) NOT NULL default '0',
        ->   `extcredits1` int(10) NOT NULL default '0',
        ->   `extcredits2` int(10) NOT NULL default '0',
        ->   `extcredits3` int(10) NOT NULL default '0',
        ->   `extcredits4` int(10) NOT NULL default '0',
        ->   `extcredits5` int(10) NOT NULL default '0',
        ->   `extcredits6` int(10) NOT NULL default '0',
        ->   `extcredits7` int(10) NOT NULL default '0',
        ->   `extcredits8` int(10) NOT NULL default '0',
        ->   `email` char(40) NOT NULL default '',
        ->   `bday` date NOT NULL default '0000-00-00',
        ->   `sigstatus` tinyint(1) NOT NULL default '0',
        ->   `tpp` tinyint(3) unsigned NOT NULL default '0',
        ->   `ppp` tinyint(3) unsigned NOT NULL default '0',
        ->   `styleid` smallint(6) unsigned NOT NULL default '0',
        ->   `dateformat` tinyint(1) NOT NULL default '0',
        ->   `timeformat` tinyint(1) NOT NULL default '0',
        ->   `pmsound` tinyint(1) NOT NULL default '0',
        ->   `showemail` tinyint(1) NOT NULL default '0',
        ->   `newsletter` tinyint(1) NOT NULL default '0',
        ->   `invisible` tinyint(1) NOT NULL default '0',
        ->   `timeoffset` char(4) NOT NULL default '',
        ->   `newpm` tinyint(1) NOT NULL default '0',
        ->   `accessmasks` tinyint(1) NOT NULL default '0',
        ->   `editormode` tinyint(1) unsigned NOT NULL default '2',
        ->   `customshow` tinyint(1) unsigned NOT NULL default '26',
        ->   `xspacestatus` tinyint(1) NOT NULL default '1',
        ->   PRIMARY KEY  (`uid`),
        ->   UNIQUE KEY `username` (`username`),
        ->   KEY `email` (`email`),
        ->   KEY `groupid` (`groupid`)
        -> ) ENGINE=MyISAM AUTO_INCREMENT=1828024 DEFAULT CHARSET=gbk;
    Query OK, 0 rows affected (0.08 sec)
      

  2.   

    接楼上
    mysql> --
    mysql> -- Dumping data for table `cdb_members`
    mysql> --
    mysql>
    mysql> INSERT INTO `cdb_members` VALUES (1,'admin','3c35f354b7109db1bc5642e5c8c0
    8dce','f7918493',0,1,1,0,'','hidden',1173125040,'222.247.56.11',1255168189,12583
    80437,1252045266,39,3,232,4561,1461,99990,999937,0,0,0,0,0,0,'[email protected]','
    0000-00-00',0,0,0,0,0,0,0,1,1,0,'9999',1,0,2,26,1);
    Query OK, 1 row affected (0.06 sec)mysql> INSERT INTO `cdb_members` VALUES (408,'狮子王','4fb19c672716f938fb7a0ca19
    a83f4cd','',0,0,10,0,'','222.240.143.34',1175345798,'58.44.34.147',1187565756,11
    75345798,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1
    ,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.01 sec)mysql> INSERT INTO `cdb_members` VALUES (493,'╅→尐傲孒℡','f31d0294d12237e4551
    c8ba152e7c9a7','',1,0,10,0,'','222.90.144.78',1175357089,'58.44.34.147',11875657
    56,1176348805,1175947246,2,0,2,0,14,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00
    ',1,0,0,1,0,2,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (494,'shl28','9a4454fe3ebf32cee875f2ab9f
    72f05c','',0,0,10,0,'','59.58.100.170',1175357096,'58.44.34.147',1187565756,1182
    748927,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1
    ,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (495,'448764614','07403992771e4f2e269cb6
    91db383168','bcc126c2',1,0,10,0,'','218.88.211.205',1175357092,'58.44.34.147',11
    87565756,1175404716,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0
    ,30,15,1,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (496,'孟鑫','ef43504f874dc053612032c501g
    eb883','',0,0,10,0,'','218.61.122.104',1175357094,'58.44.34.147',1187565756,1175
    406879,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0
    ,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (497,'牛奶稀释','f379eaf3c831b04de153469
    d1bec345e','',0,0,10,0,'','221.232.100.6',1175357102,'58.44.34.147',1187565756,1
    176289754,1175689094,1,0,2,0,13,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,
    0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.02 sec)mysql> INSERT INTO `cdb_members` VALUES (498,'cat','86b4dfefeea6cd3f1e1c307183ad
    cf3b','',0,0,10,0,'','60.164.206.6',1175357103,'58.44.34.147',1187565756,1176639
    007,1175363438,1,0,1,0,7,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,
    0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (499,'天下为正','03cde451525ec26c1471bde
    d35d50ad7','',0,0,10,0,'','124.147.134.46',1175357115,'125.70.59.173',1254131613
    ,1254131100,0,0,0,1,0,6,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0
    ,0,0,1,1,1,0,'9999',1,0,2,26,1);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (509,'na1na32','9e8689966ff16824653f3cdc
    3090d450','',0,0,10,0,'','222.179.238.70',1175357143,'58.44.34.147',1187565756,1
    175357143,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,
    0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (510,'superPC','efbd8baa56b5454d4d9a7ab4
    0f761d41','ad9b14c5',1,0,10,0,'','60.24.198.187',1175357143,'58.44.34.147',11875
    65756,1175438792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','1985-07-03',0,
    0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (511,'长久只音','658e9bedebe8915b24d8712
    516d6ed20','',0,0,10,0,'','60.17.52.43',1175357141,'58.44.34.147',1187565756,117
    7060204,1176901359,4,0,3,0,22,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,
    0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (512,'小懒','670b14728ad9902aecba32e22fa
    4f6bd','',0,0,10,0,'','222.67.235.32',1175357141,'58.44.34.147',1187565756,11757
    56490,1175357636,1,0,0,0,1,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0
    ,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (513,'翼下风','a0e7c5416874b168392a0df9a
    643ae46','',0,0,11,0,'','60.168.5.30',1175357162,'58.44.34.147',1187565756,11773
    19641,1177074669,42,0,11,180,108,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0
    ,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.02 sec)mysql> INSERT INTO `cdb_members` VALUES (514,'祝家宝','2c2e9f5158a2503666ead5345
    72c3268','',0,0,10,0,'','220.178.150.58',1175357163,'58.44.34.147',1187565756,11
    75956336,1175357638,1,0,1,0,7,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00'
    ,0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> INSERT INTO `cdb_members` VALUES (515,'◆ff.&#183;筅苼','a52936521b750209
    1d9853a180f07b66','',0,0,10,0,'','220.168.29.148',1175357159,'58.44.34.147',1187
    565756,1175365312,1175365329,7,0,1,60,13,0,0,0,0,0,0,0,0,'[email protected]','0000-0
    0-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    Query OK, 1 row affected (0.00 sec)mysql> /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
    Query OK, 0 rows affected (0.02 sec)mysql> select username from cdb_members;
    +-----------------+
    | username        |
    +-----------------+
    | 448764614       |
    | admin           |
    | cat             |
    | na1na32         |
    | shl28           |
    | superPC         |
    | ◆ff.&#183;筅苼 |
    | ╅→尐傲孒℡    |
    | 长久只音        |
    | 孟鑫            |
    | 牛奶稀释        |
    | 狮子王          |
    | 天下为正        |
    | 小懒            |
    | 翼下风          |
    | 祝家宝          |
    +-----------------+
    16 rows in set (0.00 sec)mysql>
      

  3.   

    这个只是我选了一部分 难道我的mysql版本太低?
      

  4.   

    当然是测试完了才发出来的,phpmyadmin里中文全是乱码 我的版本是mysql 5.0
      

  5.   

    mysql 命令行工具中呢?象上面一样,用命令行测试一下。
      

  6.   

    mysql> INSERT INTO `cdb_members` VALUES (514,'祝家宝','2c2e9f5158a2503666ead5345
    72c3268','',0,0,10,0,'','220.178.150.58',1175357163,'58.44.34.147',1187565756,11
    75956336,1175357638,1,0,1,0,7,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00'
    ,0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    ERROR 1406 (22001): Data too long for column 'username' at row 1
      

  7.   

    至少已经定位到出错的语句了。在你的MYSQL命令行工具中show create table ..
    show variables lik..
      

  8.   

    mysql> show create table cdb_members;
    +-------------+-----------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ---------------+
    | Table       | Create Table
    |
    +-------------+-----------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ---------------+
    | cdb_members |CREATE TABLE `cdb_members` (
      `uid` mediumint(8) unsigned NOT NULL auto_increment,
      `username` char(25) default NULL,
      `password` char(32) NOT NULL default '',
      `secques` char(8) NOT NULL default '',
      `gender` tinyint(1) NOT NULL default '0',
      `adminid` tinyint(1) NOT NULL default '0',
      `groupid` smallint(6) unsigned NOT NULL default '0',
      `groupexpiry` int(10) unsigned NOT NULL default '0',
      `extgroupids` char(20) NOT NULL default '',
      `regip` char(15) NOT NULL default '',
      `regdate` int(10) unsigned NOT NULL default '0',
      `lastip` char(15) NOT NULL default '',
      `lastvisit` int(10) unsigned NOT NULL default '0',
      `lastactivity` int(10) unsigned NOT NULL default '0',
      `lastpost` int(10) unsigned NOT NULL default '0',
      `posts` mediumint(8) unsigned NOT NULL default '0',
      `digestposts` smallint(6) unsigned NOT NULL default '0',
      `oltime` smallint(6) unsigned NOT NULL default '0',
      `pageviews` mediumint(8) unsigned NOT NULL default '0',
      `credits` int(10) NOT NULL default '0',
      `extcredits1` int(10) NOT NULL default '0',
      `extcredits2` int(10) NOT NULL default '0',
      `extcredits3` int(10) NOT NULL default '0',
      `extcredits4` int(10) NOT NULL default '0',
      `extcredits5` int(10) NOT NULL default '0',
      `extcredits6` int(10) NOT NULL default '0',
      `extcredits7` int(10) NOT NULL default '0',
      `extcredits8` int(10) NOT NULL default '0',
      `email` char(40) NOT NULL default '',
      `bday` date NOT NULL default '0000-00-00',
      `sigstatus` tinyint(1) NOT NULL default '0',
      `tpp` tinyint(3) unsigned NOT NULL default '0',
      `ppp` tinyint(3) unsigned NOT NULL default '0',
      `styleid` smallint(6) unsigned NOT NULL default '0',
      `dateformat` tinyint(1) NOT NULL default '0',
      `timeformat` tinyint(1) NOT NULL default '0',
      `pmsound` tinyint(1) NOT NULL default '0',
      `showemail` tinyint(1) NOT NULL default '0',
      `newsletter` tinyint(1) NOT NULL default '0',
      `invisible` tinyint(1) NOT NULL default '0',
      `timeoffset` char(4) NOT NULL default '',
      `newpm` tinyint(1) NOT NULL default '0',
      `accessmasks` tinyint(1) NOT NULL default '0',
      `editormode` tinyint(1) unsigned NOT NULL default '2',
      `customshow` tinyint(1) unsigned NOT NULL default '26',
      `xspacestatus` tinyint(1) NOT NULL default '1',
      PRIMARY KEY  (`uid`),
      UNIQUE KEY `username` (`username`),
      KEY `email` (`email`),
      KEY `groupid` (`groupid`)
    ) ENGINE=MyISAM DEFAULT CHARSET=gbk |
    +-------------+-----------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------------
    ---------------+
    1 row in set (0.09 sec)
      

  9.   

    mysql> show variables like 'char%';
    +--------------------------+----------------------------------------------------
    -----+
    | Variable_name            | Value
         |
    +--------------------------+----------------------------------------------------
    -----+
    | character_set_client     | latin1
         |
    | character_set_connection | latin1
         |
    | character_set_database   | gbk
         |
    | character_set_results    | latin1
         |
    | character_set_server     | latin1
         |
    | character_set_system     | utf8
         |
    | character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.0\share\chars
    ets\ |
    +--------------------------+----------------------------------------------------
    -----+
    7 rows in set (0.01 sec)
      

  10.   

    看看你的my。ini[mysql]default-character-set=latin1
    ....# The default character set that will be used when a new schema or table is
    # created and no character set is defined
    default-character-set=latin1把这些地方改成utf8或gbk
      

  11.   

    都换了,又改了UTF8又改了GBK 还重启了mysql N次 还是不行
      

  12.   

    楼主请给出以下信息。
    mysql> show variables like 'character\_set\_%';
    +--------------------------+--------+
    | Variable_name            | Value  |
    +--------------------------+--------+
    | character_set_client     | latin1 |
    | character_set_connection | latin1 |
    | character_set_database   | latin1 |
    | character_set_filesystem | binary |
    | character_set_results    | latin1 |
    | character_set_server     | latin1 |
    | character_set_system     | utf8   |
    +--------------------------+--------+
    7 rows in set (0.00 sec)mysql> show charset like 'gbk';
    +---------+------------------------+-------------------+--------+
    | Charset | Description            | Default collation | Maxlen |
    +---------+------------------------+-------------------+--------+
    | gbk     | GBK Simplified Chinese | gbk_chinese_ci    |      2 |
    +---------+------------------------+-------------------+--------+
    1 row in set (0.00 sec)mysql> status;
    --------------
    mysql  Ver 14.14 Distrib 5.1.33, for Win32 (ia32)Connection id:          1
    Current database:       csdn
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.1.33-community-log MySQL Community Server (
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Insert id:              514
    Server characterset:    latin1
    Db     characterset:    latin1
    Client characterset:    latin1
    Conn.  characterset:    latin1
    TCP port:               3306
    Uptime:                 1 hour 40 min 53 secThreads: 1  Questions: 46  Slow queries: 0  Opens: 23  Flush tables:
    les: 1  Queries per second avg: 0.7
    --------------mysql> CREATE TABLE `cdb_members1` (
        ->   `uid` mediumint(8) unsigned NOT NULL auto_increment,
        ->   `username` char(25) default NULL,
        ->   PRIMARY KEY  (`uid`),
        ->   UNIQUE KEY `username` (`username`)
        -> ) ENGINE=MyISAM DEFAULT CHARSET=gbk ;
    Query OK, 0 rows affected (0.05 sec)mysql> INSERT INTO `cdb_members1` VALUES (514,'祝家宝');
    Query OK, 1 row affected, 1 warning (0.02 sec)
      

  13.   

    mysql> INSERT INTO `cdb_members1` VALUES (514,'祝家宝');
    Query OK, 1 row affected, 1 warning (0.00 sec)mysql> show warnings;
    +---------+------+--------------------------------------------------------------
    -----------------+
    | Level   | Code | Message
                     |
    +---------+------+--------------------------------------------------------------
    -----------------+
    | Warning | 1366 | Incorrect string value: '\xA3\xBC\xD2\xB1\xA6' for column 'us
    ername' at row 1 |
    +---------+------+--------------------------------------------------------------
    -----------------+
    1 row in set (0.00 sec)mysql> select * from cdb_members1;
    +-----+----------+
    | uid | username |
    +-----+----------+
    | 514 | ????   |
    +-----+----------+
    1 row in set (0.06 sec)mysql> set names 'gbk';
    Query OK, 0 rows affected (0.00 sec)mysql> INSERT INTO `cdb_members1` VALUES (515,'祝家宝1');
    Query OK, 1 row affected (0.06 sec)mysql> select * from cdb_members1;
    +-----+----------+
    | uid | username |
    +-----+----------+
    | 514 | ×???±? |
    | 515 | 祝家宝1  |
    +-----+----------+
    2 rows in set (0.00 sec)mysql>
      

  14.   

    my.ini 里改成utf8的时候:mysql> show variables like 'character\_set\_%';
    +--------------------------+--------+
    | Variable_name            | Value  |
    +--------------------------+--------+
    | character_set_client     | latin1 |
    | character_set_connection | latin1 |
    | character_set_database   | utf8   |
    | character_set_results    | latin1 |
    | character_set_server     | utf8   |
    | character_set_system     | utf8   |
    +--------------------------+--------+
    6 rows in set (0.00 sec)mysql> status;
    --------------
    C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe  Ver 14.12 Distrib 5.0.18,
     for Win32 (ia32)Connection id:          1
    Current database:       fuck
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.0.18-nt
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Server characterset:    utf8
    Db     characterset:    gbk
    Client characterset:    latin1
    Conn.  characterset:    latin1
    TCP port:               3306
    Uptime:                 1 min 3 secThreads: 1  Questions: 8  Slow queries: 0  Opens: 0  Flush tables: 1  Open table
    s: 6  Queries per second avg: 0.127
    --------------mysql> CREATE TABLE `cdb_members2` (
        -> `uid` mediumint(8) unsigned NOT NULL auto_increment,
        ->  `username` char(25) default NULL,
        -> PRIMARY KEY  (`uid`),
        -> UNIQUE KEY `username` (`username`)
        -> ) ENGINE=MyISAM DEFAULT CHARSET=gbk ;
    Query OK, 0 rows affected (0.00 sec)mysql> INSERT INTO `cdb_members1` VALUES (514,'祝家宝');
    ERROR 1406 (22001): Data too long for column 'username' at row 1
    改成GBK的时候:
    mysql> show variables like 'character\_set\_%';
    +--------------------------+--------+
    | Variable_name            | Value  |
    +--------------------------+--------+
    | character_set_client     | latin1 |
    | character_set_connection | latin1 |
    | character_set_database   | gbk    |
    | character_set_results    | latin1 |
    | character_set_server     | gbk    |
    | character_set_system     | utf8   |
    +--------------------------+--------+
    6 rows in set (0.00 sec)mysql> show charset like 'gbk';
    +---------+------------------------+-------------------+--------+
    | Charset | Description            | Default collation | Maxlen |
    +---------+------------------------+-------------------+--------+
    | gbk     | GBK Simplified Chinese | gbk_chinese_ci    |      2 |
    +---------+------------------------+-------------------+--------+
    1 row in set (0.01 sec)mysql> status;
    --------------
    C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe  Ver 14.12 Distrib 5.0.18,
     for Win32 (ia32)Connection id:          1
    Current database:
    Current user:           root@localhost
    SSL:                    Not in use
    Using delimiter:        ;
    Server version:         5.0.18-nt
    Protocol version:       10
    Connection:             localhost via TCP/IP
    Server characterset:    gbk
    Db     characterset:    gbk
    Client characterset:    latin1
    Conn.  characterset:    latin1
    TCP port:               3306
    Uptime:                 1 min 41 secThreads: 1  Questions: 7  Slow queries: 0  Opens: 0  Flush tables: 1  Open table
    s: 6  Queries per second avg: 0.069
    --------------mysql> CREATE TABLE `cdb_members1` (
        ->   `uid` mediumint(8) unsigned NOT NULL auto_increment,
        ->  `username` char(25) default NULL,
        -> PRIMARY KEY  (`uid`),
        -> UNIQUE KEY `username` (`username`)
        -> ) ENGINE=MyISAM DEFAULT CHARSET=gbk ;
    Query OK, 0 rows affected (0.03 sec)
    mysql> INSERT INTO `cdb_members1` VALUES (514,'祝家宝');
    ERROR 1406 (22001): Data too long for column 'username' at row 1mysql> show warnings;
    +-------+------+----------------------------------------------+
    | Level | Code | Message                                      |
    +-------+------+----------------------------------------------+
    | Error | 1406 | Data too long for column 'username' at row 1 |
    +-------+------+----------------------------------------------+
    1 row in set (0.00 sec)
      

  15.   

    你少了一步。mysql> set names 'gbk';
    Query OK, 0 rows affected (0.00 sec)检查一下你的 xxx.sql 中有没有这个 set names ...
    没有的话,就需要加入。
      

  16.   

    恩插入了 这一步没有问题。mysql> set names 'gbk';
    Query OK, 0 rows affected (0.00 sec)mysql> INSERT INTO `cdb_members1` VALUES (515,'祝家宝1');
    Query OK, 1 row affected (0.06 sec)mysql> select * from cdb_members1;
    +-----+----------+
    | uid | username |
    +-----+----------+
    | 515 | 祝家宝1  |
    +-----+----------+
    2 rows in set (0.00 sec)
      

  17.   

    1. 在你的文件中加上这一句。
    2。 mysql -uroot --default-character-set=gbk ... <xxx.sql
      

  18.   


    看#15楼
    加在你的 insert 之前
    mysql -uroot -p123 --default-character-set=gbk < xxx.sql这个在MYSQL的帮助手册中都有啊!
    MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
      

  19.   

    --
    -- Dumping data for table `cdb_members`
    --
    set names 'gbk';
    INSERT INTO `cdb_members` VALUES (1,'admin','3c35f354b7109db1bc5642e5c8c08dcf','f7918493',0,1,1,0,'','hidden',1173125040,'222.247.56.11',1255168189,1258380437,1252045266,39,3,232,4561,1461,99990,999937,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,0,1,1,0,'9999',1,0,2,26,1);
    INSERT INTO `cdb_members` VALUES (408,'狮子王','4fb19c672716f938fb7a0ca19a83facd','',0,0,10,0,'','222.240.143.34',1175345798,'58.44.34.147',1187565756,1175345798,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','0000-00-00',0,0,0,0,0,0,1,1,1,0,'9999',1,0,2,26,0);
    INSERT INTO `cdb_members` VALUES (409,'aiver','e3992f6574bfef6a0760ab4cddd1d43f','be9f8bc6',1,0,10,0,'','222.240.143.34',1175346566,'58.44.34.147',1187565756,1175348237,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'[email protected]','1984-08-11',0,0,0,1,0,2,3,1,1,0,'9999',1,0,2,26,0);我加在这个地方了,然后source这个文件,问题依然。但是在mysql命令行里执行set name.. 再执行一条Insert就没事。。奇怪??还有这个命令,为什么执行了没有反应?mysql> mysql -uroot -p123 --default-character-set=gbk < e:\data\user.sql;
        -> mysql -uroot -p123 --default-character-set=gbk < e:\data\user.sql
        -> mysql -uroot -p123 --default-character-set=gbk < e:\data\user.sql
      

  20.   

    是不是这个文件哪里的问题啊?执行insert插入数据就没问题,但是一source导入这个sql文件就还是乱码