kettle jdbc MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT'
kettle 使用表输入连接mysql获取字段名时,报check the manual that corresponds to your MySQL server version for the right syntax to use near ‘OPTION SQL_SELECT_LIMIT=DEFAULT’ 错误,记录报错信息和处理结果,供大家参考
报错信息:
Couldn’t get field info from [SELECT * FROM oa.applies]
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
kettle环境信息
###########################
centos:centos 7.4
java:jdk8
kettle:pdi-ce-8.2.0.0-342
mysql:mysql 5.7
mysql java connect:mysql-connector-java-5.1.17.jar
###########################
kettle 报错原因分析:
5.6以下的mysql数据库,在连接数据库时候会发送测试语句SET OPTION SQL_SELECT_LIMIT=DEFAULT,通常在mysql-connector-java-5.1.25.jar以前为了保持5.6的兼容,保留了此功能,若是mysql server版本号小于5.6,那么此功能支持;
若mysql版本号大于5.6,那么则不支持此功能,需要升级mysql connector版本,否则会引起此报错。
解决办法
升级mysql-connector-java为mysql-connector-java-5.1.47.jar,即可正常使用。
参考资料
Connector/J version | Driver Type(驱动类型) | JDBC version(jdbc版本) | MySQL Server version(mysql server版本号) | Status(状态) |
---|---|---|---|---|
8.0 | 4 | 4.2 | 5.6, 5.7, 8.0 | 一般可用,推荐版本 |
5.1 | 4 | 3.0, 4.0, 4.1, 4.2 | 5.6*, 5.7*, 8.0* | 一般可用 |
5.0 | 4 | 3.0 | 4.1,5.0 | |
3.1 | 4 | 3.0 | 4.1,5.0 | |
3.0 | 4 | 3.0 | 3.x,4.1 |
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT’
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
- dbvis MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at lin
- 闲谈PageHelper分页插件出现的异常:check the your MySQL server version for the right syntax to use near 'LIMIT 5'
- 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
- 插入mysql语句报错:1064 - 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
- MySql 执行语句错误 Err] 1064 - 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
- SQL syntax:...MySQL server version for the right syntax to use near 'rank CHAR(1))'
- 使用Hibernate报错:MySQL server version for the right syntax to use near 'type=InnoDB' at line xxx
- MySQL server version for the right syntax to use near '-1.stu stu0_' at line 1
- MySQL server version for the right syntax to use near
- check the manual that corresponds to your MySQL server version for the right syntax to use near‘XXX’
- MySQL server version for the right syntax to use near '' at line 1
- MySQL server version for the right syntax to use near 'type=InnoDB' at line 1
- check the manual that corresponds to your MySQL server version for the right syntax to use near 'USI
- check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYP
- mysql ignore 不能执行MySQL server version for the right syntax to use near ignore问题
- MySQL server version for the right syntax to use near 'type=InnoDB' at line 1