即使出现"Where",MySQL Workbench错误1175仍然存在.陈述 [英] MySQL Workbench Error 1175 Even With a "Where" Statement

查看:137
本文介绍了即使出现"Where",MySQL Workbench错误1175仍然存在.陈述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在安全更新模式"下运行MySQL Workbench 6.3.8 b1228 CE(64位).我正在尝试使用"WHERE"语句运行查询 ,但它仍返回错误1175"

I am running MySQL Workbench 6.3.8 b1228 CE (64-bit) in "safe update mode". I am trying to run a query with a "WHERE" statement, but it still returns "Error 1175"

这是我的查询语句:

DELETE FROM `my_db`.`table_name` WHERE `email` = 'john@smith.com';

(显然"my_db"和"table_name"是占位符.)

(Obviously "my_db" and "table_name" are placeholders.)

当我包含最基本的"WHERE"语句时,为什么工作台会为此查询抛出错误1175?

Why would Workbench throw Error 1175 for this query when I have the most basic of "WHERE" statements included?

推荐答案

默认情况下,在Sql中启用了安全选项,该选项限制了用户使用不合适的密钥删除或更新表中的数据.要转到安全更新,请转到

In Sql by default safe options is enabled which restricts the user from deleting or updating the data in table using inappropriate key.To turn of the safe update go to

edit->preferences->sql编辑器,然后取消选中首选项窗口底部的安全更新"复选框,甚至您也可以删除或更新引用主键的内容.

edit->preferences->sql editor and uncheck the safe update check box at the bottom of the preference window or even you can delete or update referencing the primary key.

例如:让我们考虑有一个名为user_details的表,该表包含四个字段(namenumberemailaddress),其中name是主键. 所以您的删除语句看起来像这样

For Example: Let us consider we have table called user_details with four fields(name, number, email ,address) where name is the primary key. So your delete statement would look like this

Delete from user_details where name="xxx";

注意:关闭安全更新后,重新连接到数据库.即使您可以重新启动服务器,但重新连接本身也可以正常工作.

Note: Reconnect to the database after safe update is turned off. Even you can restart the server but reconnect itself works fine.

希望这可以解决您的问题.

Hope this solves your issue.

这篇关于即使出现"Where",MySQL Workbench错误1175仍然存在.陈述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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