当前位置: 代码迷 >> 综合 >> mysql:解决ERROR 1366 (HY000): Incorrect string value: ‘\xD2\xBB\xB0\xE0‘ for column ‘name‘ at row 1
  详细解决方案

mysql:解决ERROR 1366 (HY000): Incorrect string value: ‘\xD2\xBB\xB0\xE0‘ for column ‘name‘ at row 1

热度:58   发布时间:2023-12-14 22:30:18.0

mysql> insert into class values(1,"一班"); 

ERROR 1366 (HY000): Incorrect string value: '\xD2\xBB\xB0\xE0' for column 'name' at row 1

 

建表的时候设置字符编码

mysql> create table user6(
    -> id int,
    -> name varchar(20)
    -> )default charset=utf8;

  相关解决方案