1. 首页
  2. IT资讯

rhel4 mysql5.5字符集_客户端mysql乱码处理

   mysql5.5默认采用的字符集是latin1,通过查看建表的ddl语句,发现表的默认字符集为gbk,最终修改character_set_results为gbk,汉字得以正常显示,乱码哟,好好研究下;

 

mysql> set character_set_results=’gbk2312′;
ERROR 1115 (42000): Unknown character set: ‘gbk2312’
mysql> set character_set_results=’gbk’;
Query OK, 0 rows affected (0.00 sec)

mysql> select msg_id,content_member,content_admin from auxi_msg;
+——–+—————————————+———————————————————————————————————————————————————————————————————————————————————————————————————–+
| msg_id | content_member                        | content_admin                                                                                                                                                                                                                                                                                             |
+——–+—————————————+———————————————————————————————————————————————————————————————————————————————————————————————————–+
|      1 | 请问JEECMS v2.4版什么时候发布?  | JEECMS v2.4版定于2010年1月15日上午10点发布,敬请关注!                                                                                                                                                                                                                                               |

7、整站(主站与子站点)搜索  |?  | JEECMS v2.4版新增了以下功能:
|      3 | 11111111111                           | NULL                                                                                                                                                                                                                                                                                                      |
+——–+—————————————+———————————————————————————————————————————————————————————————————————————————————————————————————–+
3 rows in set (0.00 sec)

mysql> show create table auxi_msg; #查看表auxi_msg的建表ddl语句
+———-+———————————————————————————————————————————-+
| Table    | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
———————————-+
| auxi_msg | CREATE TABLE `auxi_msg` (
  `MSG_ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `ADMIN_ID` bigint(20) DEFAULT NULL,
  `MSGCTG_ID` bigint(20) NOT NULL,
  `WEBSITE_ID` bigint(20) NOT NULL,
  `MEMBER_ID` bigint(20) DEFAULT NULL,
  `CONFIG_ID` bigint(20) NOT NULL,
  `TITLE` varchar(200) DEFAULT NULL COMMENT ‘á???±êìa’,
  `CONTENT_MEMBER` longtext COMMENT ‘á????úèY’,
  `CONTENT_ADMIN` longtext COMMENT ‘???′?úèY’,
  `EMAIL` varchar(100) DEFAULT NULL COMMENT ‘μ?×óóê??’,
  `PHONE` varchar(100) DEFAULT NULL COMMENT ‘áa?μμ??°’,
  `QQ` varchar(50) DEFAULT NULL COMMENT ‘QQ’,
  `IP` varchar(20) DEFAULT NULL COMMENT ‘á???IP’,
  `CREATE_TIME` datetime DEFAULT NULL COMMENT ‘á???ê±??’,
  `REPLY_TIME` datetime DEFAULT NULL COMMENT ‘???′ê±??’,
  `IS_CHECK` tinyint(1) NOT NULL COMMENT ‘ê?·?éóo?’,
  `IS_RECOMMEND` tinyint(1) NOT NULL COMMENT ‘ê?·?í???’,
  `IS_DISABLED` tinyint(1) NOT NULL COMMENT ‘ê?·???ó?’,
  PRIMARY KEY (`MSG_ID`),
  KEY `FK_AMSG_ADMIN` (`ADMIN_ID`),
  KEY `FK_AMSG_MEMBER` (`MEMBER_ID`),
  KEY `FK_AMSG_MSGCTG` (`MSGCTG_ID`),
  KEY `FK_AMSG_WEBSITE` (`WEBSITE_ID`),
  KEY `FK_AUXIMSG_CONFIG` (`CONFIG_ID`),
  KEY `FK8AF99647239FDD98` (`MEMBER_ID`),
  KEY `FK8AF99647E0DAA180` (`CONFIG_ID`),
  KEY `FK8AF9964716B9157C` (`ADMIN_ID`),
  KEY `FK8AF99647FF34817C` (`WEBSITE_ID`),
  KEY `FK8AF99647460F367B` (`MSGCTG_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=gbk COMMENT=’á???°?á???’ |
+———-+———————————————————————————————————————————-+
1 row in set (0.00 sec)

mysql>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-665800/,如需转载,请注明出处,否则将追究法律责任。

主题测试文章,只做测试使用。发布者:℅傍ㄖ免沦陷dε鬼,转转请注明出处:http://www.cxybcw.com/192816.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code