---
title: "excel数据导入mysql报Incorrect string value: '\\xFEV' for column "
author: "dbaspider"
date: "2015-09-29T15:26:00Z"
tags: []
categories: ["数据库"]
slug: "excel-mysql-incorrect-string-value-xfev-for-column"
draft: false
lastmod: "2015-09-29T15:25:48Z"
id: 2246770
url: "https://dbaspider.iteye.com/blog/2246770"
---

问题：
<span style="color:red">java.sql.BatchUpdateException: Incorrect string value: '\xFEV' for column 'name' at row 1</span>
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2020)
	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1451)

解决办法：

jdbc_url=jdbc:mysql://localhost:3306/pdb<span style="color:red">?useUnicode=true&characterEncoding=UTF-8</span>

就是java里面连接数据库时，指定字符集(编码集)和数据库的保持一致。