You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1

 

 

原因:

项目中我用的jdbc驱动版本

mysql-connector-java-5.1.15.jar

mysql数据库版本为5.6

jdbc在连接数据库时候会发送测试语句SET OPTION SQL_SELECT_LIMIT=DEFAULT

这在mysql5.6以下版本是可以的 ,但是5.6不再支持SET...

 

解决:

 升级驱动版本,我改成了mysql-connector-java-5.1.25.jar  问题解决

--------------------

注意:版本要匹配才行,否则会出错。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-08-16
  • 2021-06-09
  • 2022-12-23
  • 2022-03-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-03-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-11-21
相关资源
相似解决方案