eclipse连接mysql
成功后查询报错
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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=500' at line 1
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=500' at line 1
原因 mysql-connector-java 版本问题 mysql版本为5.6 用的驱动版本为5.0 更换为5.1.25后成功

本文介绍使用Eclipse连接MySQL时出现的SQL语法错误,具体表现为'OPTION SQL_SELECT_LIMIT=500'附近的语法问题。通过更换mysql-connector-java版本从5.0到5.1.25解决了该问题。
2033

被折叠的 条评论
为什么被折叠?



