ERROR 1366 (HY000): Incorrect stringvalue

插入语句中含有中文

出现

“ERROR 1366 (HY000): Incorrect stringvalue......”错误。

解决方法:

  1. 设置编码
  2. set names gbk;
时间: 2024-10-11 06:47:39

ERROR 1366 (HY000): Incorrect stringvalue的相关文章

命令行插入含有中文的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

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: '\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:

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

MySQL错误:ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

MySQL错误:ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES在执行MySQL复制的前奏时:为主服务器创建用户以便从服务器连接,出现该错误:GRANT REPLICATION SLAVE ON a_database.* to 'repl'@'domain.test' IDENTIFIED BY 'slavepass';之所以指定数据库我是希望能只复制这个数据库而忽略其他(已创建的或今后会创建的)数据库.因

mysql ERROR 126 (HY000): Incorrect key file for table '/tmp/#sql_1d87_0.MYI'; try to repair it

[[email protected] ~]# df -h 查看是否空间不足 在查看mysql数据目录情况 mysql> show variables like '%dir%'; +-----------------------------------------+------------------------------------+ | Variable_name                           | Value                              |

MySQL案例02:ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

MySQL在授权用户时出现报错信息,具体信息如下: 一.错误信息 执行命令: GRANT SELECT,INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION