Eclipse 使用Data Source Explorer异常'OPTION SQL_SELECT_LIMIT=500' at line 1

来源:互联网 发布:摄影师林海音 知乎 编辑:程序博客网 时间:2024/05/21 19:39

在用Eclipse数据库视图Data->Edit表格数据时出现以下异常(以前也就连Oracle的时候用过,感觉不如cmd输入爽,因为要不断切换eclipse窗口无法多窗口同用---个人感觉0,0):

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

原因:jdbc的jar包版本不正确,我的MySQL版本是5.6.24却使用的是5.1.8的jar包,5.1.8版本连接数据库时发送的测试语句为 'OPTION SQL_SELECT_LIMIT=500',但5.6版本的连接测试语句已改变,虽不影响数据的操作,但无法使用eclipse Data Source的表数据编辑功能。把jdbc的jar包改成5.1.25(mysql 5.6的jdbc驱动包,我博客里有)即可,附上成功图:

0 0
原创粉丝点击