MySQL: Data truncation: Incorrect datetime value: '2006-10-01 02:22:44'

前端 未结 5 2221
遥遥无期
遥遥无期 2021-02-19 09:22

I\'m getting the following exception updating a row using MySQL via JDBC:

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: \

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 10:03

    I fixed the same problem (com.mysql.jdbc.MysqlDataTruncation: Data truncation: Incorrect datetime value: '' for column 'perev_start_time' at row 1) by upgrading my MySQL connector JAR, and copying the mysql.jar to the Tomcat lib directory.

    The version of MySQL Server is 5.6 and the MySQL connector is mysql-connector-java-5.1.30-bin.jar.

提交回复
热议问题