MySQL Case: Java program Access MySQL error ' OPTION sql_select_limit=xxx '
"Environment description"
MySQL version: 5.6.14-56-log percona Server (GPL)
Program: Access MySQL database using JDBC driver Mysql-connector-java
"Error Message"
When the program accesses MySQL to execute the SQL statement, the error:
You have a 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=5 ' at line 1
"Cause of the error"
The JDBC driver version used by the program is incompatible with the MySQL5.6 version
"Workaround"
Upgrade Mysql-connector-java Drive
Test set OPTION sql_select_limit=5 no more errors.
Summarize:
When using the new version of MySQL, not only the database to test, but also with the program to test together.
This column more highlights: http://www.bianceng.cn/database/MySQL/