Error code 1064, SQL state 42000: You have an error in your SQL syntax;

jdbc, mysql, netbeans

Solution

That looks like an error coming from a JDBC driver. When the JDBC driver initializes the connection, it sends several commands to the MySQL server, one of which is:

SET OPTION SQL_SELECT_LIMIT=DEFAULT

The problem is that the `SET OPTION` syntax has been deprecated for some time and is now no longer valid in MySQL 5.6. Here's a relevant bug conversation from MySQL's bug database:

Bug #66659: mysql 5.6.6m9 fails on OPTION SQL_SELECT_LIMIT=DEFAULT

Try upgrading your JDBC MySQL driver. The bug conversation lists some other options in case upgrading the driver is not an option.

Problem

I'm using latest version of MySQL ==> mysql-5.6.10-winx64.zip Created the database and every thing is ok 'I think' when I try to execute this simple command; ``` "select * from family" ``` I got this error : Error code 1064, SQL state 42000: 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 I've spent much time searching for a solution but no solution was found :(

Original source