ERROR 1366 (HY000): Incorrect string value: '\xC6\xF4\xD3\xC3' for column 'name' at row 1

ERROR 1366 (HY000): Incorrect string value: ‘\xC6\xF4\xD3\xC3‘ for column ‘name‘ at row 1

mysql>status

D:\mysql6.0\bin\mysql.exe  Ver 14.15 Distrib 6.0.11-alpha, for Win64 (unknown)

Connection id:          1

Current database:       bank

Current user:           [email protected]

SSL:                    Not in use

Using delimiter:        ;

Server version:         6.0.11-alpha-community MySQL Community Server (GPL)

Protocol version:       10

Connection:             localhost via TCP/IP

Server characterset:    utf8

Db     characterset:    utf8

Client characterset:    utf8

Conn.  characterset:    utf8

TCP port:               3306

Uptime:                 5 hours 29 min 25 sec

Threads: 1  Questions: 43  Slow queries: 0  Opens: 52  Flush tables: 1  Open tables: 4  Queries per second avg: 0.2

#如上所示,所有的编码都是utf8

mysql> show create table status;

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

| Table  | Create Table

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

| status | CREATE TABLE `status` (

`id` int(11) NOT NULL AUTO_INCREMENT,

`name` varchar(20) DEFAULT NULL,

PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 |

创建的status表的格式也是utf8格式的

插入数据:

mysql> insert into status(name) values("启用");

ERROR 1366 (HY000): Incorrect string value: ‘\xC6\xF4\xD3\xC3‘ for column ‘name‘ at row 1

#解决办法:

mysql> set names gbk;

Query OK, 0 rows affected (0.00 sec)

mysql> insert into status(name) values("启用");

Query OK, 1 row affected (0.06 sec)

ERROR 1366 (HY000): Incorrect string value: '\xC6\xF4\xD3\xC3' for column 'name' at row 1

时间: 2024-10-13 12:00:21

ERROR 1366 (HY000): Incorrect string value: '\xC6\xF4\xD3\xC3' for column 'name' at row 1的相关文章

ERROR 1366 (HY000): Incorrect string value: '\xD5\xC5\xC8\xFD' for column 'name' at row 1

ERROR 1366 (HY000): Incorrect string value: '\xD5\xC5\xC8\xFD' for column 'name' at row 1 数据库字符集问题,查看数据库状态: mysql> status; -------------- mysql  Ver 14.14 Distrib 5.6.12, for Win32 (x86) Connection id:          25 Current database:       information_

mysql 插入中文时出现ERROR 1366 (HY000): Incorrect string value: '\xC0\xEE\xCB\xC4' for column 'usern ame' at row 1

1 环境: MySQL Server 6.0  命令行工具 2 问题 :  插入中文字符数据出现如下错误: ERROR 1366 (HY000): Incorrect string value: '\xC0\xEE\xCB\xC4' for column 'usern ame' at row 1 3 当时环境: mysql> insert into user(id , username , birthday, sex, address) values('2' , ' 李四' , '1980 12

ERROR 1366 (HY000): Incorrect string value: '\xAD\xE5\x9B\xBD\xE9\x82...' fo的解决方法

本地wamp导入4G数据时,出现了ERROR 1366 (HY000): Incorrect string value: '\xAD\xE5\x9B\xBD\xE9\x82...,如图下 找到的解决的方法如下: my.ini,打开 1.在[client]段落增加:default-character-set=utf8 2.在[mysqld]段落增加:character_set_server=utf8 重启MySQL服务即可. 如果还是不能解决问题,重新打开 Mysql 控制台操作如下: 1. 打开

解决mysql插入中文字符报错的问题ERROR 1366 (HY000): Incorrect string value: ‘\xE5\xB0\x8F\xE6\x98\x8E‘ for column ‘name‘ at row 1

原文:解决mysql插入中文字符报错的问题ERROR 1366 (HY000): Incorrect string value: '\xE5\xB0\x8F\xE6\x98\x8E' for column 'name' at row 1 报错内容: mysql> insert into person values (1,22,'小明');ERROR 1366 (HY000): Incorrect string value: '\xE5\xB0\x8F\xE6\x98\x8E' for colum

ERROR 1366 (HY000): Incorrect stringvalue

插入语句中含有中文 出现 "ERROR 1366 (HY000): Incorrect stringvalue......"错误. 解决方法: 设置编码 set names gbk;

命令行插入含有中文的sql文件,报错ERROR 1366 (HY000): Incorrect stringvalue:

--以下是插入语句: insert into sms_inbox values('123456','123456', 'cd', sysdate(), '今天天 气很好', 1, sysdate(), '123456'); --报错: ERROR 1366 (HY000): Incorrect stringvalue: '\xBD\xF1\xCC\xEC\xCC\xEC...' for co lumn 'MESSAGECONTENT' at row 1 --解决:设置编码 set names g

Incorrect string value: '\xF0\xA1\xA1\x92' for column 'herst' at row 1

Incorrect string value: '\xF0\xA1\xA1\x92' for column 'herst' at row 1[转] 1.一般来说MySQL(小于5.5.3)字符集设置为utf8,指定连接的字符集也为utf8,django中save unicode string是木有问题的.但是,当字符串中有特殊字符(如emoji表情符号,以及其他凡是转成utf8要占用4字节的字符),就会有问题,会报错Incorrect string value: '\xF0\x9F\x92\x9

插入失败,错误提示:Incorrect string value: '\xB1\xEA\xCC\xE2' for column 'title' at row 1

PHP解决乱码问题只需在连接后加入mysql_query("set names 'gbk'") 就OK!如: $conn = mysql_connect("localhost","root",""); mysql_query("set names 'gbk'"); 插入失败,错误提示:Incorrect string value: '\xB1\xEA\xCC\xE2' for column 'title'

表情存储异常--mybatis抛出异常(java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'name' at row 1)

文章参考 https://blog.csdn.net/junsure2012/article/details/42171035 https://www.cnblogs.com/WangYunShuaiBaoLe/p/9055215.html https://www.jb51.net/article/112879.htm 背景 iOS端测试时发现,在备注一栏输出emoji表情,保存时出现系统异常 java项目架构 spring-boot+mybatis+德鲁伊连接池 现象 抛出  java.sql