错误代码1064,SQL状态42000:SQL语法有错误; [英] Error code 1064, SQL state 42000: You have an error in your SQL syntax;

查看:1708
本文介绍了错误代码1064,SQL状态42000:SQL语法有错误;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新版本的MySQL ==> mysql-5.6.10-winx64.zip

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"

我收到此错误:

错误代码1064,SQL状态42000:您的SQL错误 句法;检查与您的MySQL服务器版本相对应的手册 在"OPTION SQL_SELECT_LIMIT = DEFAULT"附近使用正确的语法 第1行

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 :(

推荐答案

这看起来像是来自JDBC驱动程序的错误. JDBC驱动程序初始化连接时,它将向MySQL服务器发送多个命令,其中之一是:

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

问题是SET OPTION语法已被弃用一段时间,现在在MySQL 5.6中不再有效.这是来自MySQL错误数据库的相关错误对话:

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:

错误#66659:mysql 5.6.6m9在选项SQL_SELECT_LIMIT = DEFAULT上失败

尝试升级JDBC MySQL驱动程序.错误对话中列出了其他一些选项,以防无法升级驱动程序.

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

这篇关于错误代码1064,SQL状态42000:SQL语法有错误;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆