提示这样

1366 - Incorrect string value: '\xC0\x86' for column 'platecl' at row 1

mysql插入中文出错,提示1366 - Incorrect

 

是因为编码的问题(在这儿我们需要的是gbk,当然许多用户使用UTF8就好了,应该更通用)

我们通过查看

show variables like '%character_set%';

看到编码不是gbk

 

这里需要两个修改配置文件,重新mysql服务器。

/etc/mysql/mysql.conf.d/mysqld.cnf里

mysql插入中文出错,提示1366 - Incorrect

 

/etc/mysql/conf.d/mysql.cnf里

mysql插入中文出错,提示1366 - Incorrect

 

相关文章:

  • 2021-12-08
  • 2022-12-23
  • 2021-05-25
  • 2021-10-06
  • 2021-04-13
  • 2021-04-16
  • 2021-04-19
猜你喜欢
  • 2021-12-29
  • 2022-12-23
  • 2022-02-14
  • 2022-02-09
  • 2021-10-12
  • 2021-07-28
  • 2022-01-03
相关资源
相似解决方案