java.sql.SQLException: Incorrect string value: '\xE6\xA2\x81\xE9\x9B\xAF...' for column 'XM' at row 1
时间: 2023-08-28 08:16:42 浏览: 149
服务器出现java.sql.SQLException No suitable driver found for 的.pdf
引用和中提到的错误是由于在MySQL插入中文字符时,表的编码不匹配导致的。错误消息中的\x开头的字符是十六进制表示的Unicode编码。这些错误可以通过修改表的编码来解决。引用中提供了两种解决办法。第一种是通过修改单个表的属性来改变表的编码。可以使用以下命令来修改表的编码:ALTER TABLE 表名 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin。第二种解决办法是删除表并重新创建。您可以选择其中一种方法来解决这个问题,并确保表的编码与插入的字符串匹配。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [9-java.sql.SQLException: Incorrect string value: ‘\xE9\x82\xA3\xE5\xB0\xB1‘ for column ‘content](https://blog.csdn.net/lf18879954995/article/details/109152650)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [MySQL报错:Cause: java.sql.SQLException: Incorrect string value: '\xE6\x9D\xA8","...' for column '...](https://blog.csdn.net/weixin_30344131/article/details/101654677)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [java.sql.SQLException: Incorrect string value: ‘\xE6\xB5\x8B\xE8\xAF\x95...‘ for column ‘xxx](https://blog.csdn.net/qq_33839972/article/details/123250394)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文