今天遇到一个mysql错误:
 
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect.

网上查了一下,原来是SET SQL_SAFE_UPDATES设置为1的原因。

解决办法:

执行

SET SQL_SAFE_UPDATES = 0;

执行完毕后,sql语句运营就没有问题了。

完事后最好改回去:

SET SQL_SAFE_UPDATES = 1;

因为 SQL_SAFE_UPDATES 可以防止不安全的sql执行,比如以下sql

delete from table t1 /* where true */;
update t set col='ss' /* where true */

上面这两条程序执行的话,估计该卷铺盖走人了。

mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……的更多相关文章

  1. MySQL Workbench update语句错误Error Code: 1175.

    rom:http://www.tuicool.com/articles/NJ3QRz MySQL update error: Error Code: 1175. You are using safe ...

  2. Mysql Update更新错误 Error Code:1175

    Mysql 5.7,默认执行 update 语句时遇到错误提示: Error Code: 1175. You are using safe update mode and you tried to u ...

  3. MySQL Workbench “Error Code: 1175” 的解决方法

    转自:http://www.linuxidc.com/Linux/2012-04/59333.htm 当用MySQL Workbench进行数据库的批量更新时,执行一个语句会碰到以下错误提示: Err ...

  4. Mysql Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode

    今天用mysql workbench在更新数据的时候,出现了下面错误:15:52:39    update wp_posts set post_content = replace(post_conte ...

  5. Mysql报错Error Code: 1175. You are using safe update

    使用MySQL执行update的时候报错:Error Code: 1175. You are using safe update mode and you tried to update a tabl ...

  6. Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table

    Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...

  7. 【MySQL笔记】解除输入的安全模式,Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect.

    Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE tha ...

  8. Mysql Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

    Mysql update error: Error Code: 1175. You are using safe update mode and you tried to update a table ...

  9. mysql 报错:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences

    目录 #事故现场 #解决方法 #事故现场 mysql执行update操作报错: sql如下: update psmp.Users set name='Jack' where name='Lily'; ...

随机推荐

  1. Ubuntu修改计算机名称造成无法解析主机问题解决方法

    在通过修改/etc/hostname文件方法修改计算机名称后导致有时候出现无法解析主机的问题. 解决方法: 找到/etc/hosts文件,打开找到如下一行 127.0.1.1       旧主机名 将 ...

  2. 使用PHP自动部署GIT代码

    最近在使用Coding的代码托管,顺便设置了WebHook自动部署,过程还是挺艰辛的,主要还是没搞懂Linux的权限控制,不过好在弄好了,分享一下获益最深的一篇文章,供大家参考,原文是英文版的,我的英 ...

  3. Esper

    https://www.igvita.com/2011/05/27/streamsql-event-processing-with-esper/ http://torycatkin.iteye.com ...

  4. java中内存结构及堆栈详解

    一. java内存结构 1. Heap(堆):实例分配的地方,通过-Xms与-Xmx来设置 2. MethodArea(方法区域):类的信息及静态变量. 对应是Permanet Generation, ...

  5. 在cocos2d-x界面中嵌入Android的WebView

    在Cocos2dxActivity.java中, (1) 增加函数onCreateLayout, [java]  view plain copy   public LinearLayout onCre ...

  6. 全选demo

    我们处理数据时,最好能够支持全选操作. 选中之后,进行删除,或其他处理. 我自己写了一个demo. 主要功能: 1.点击全部选中 2.点击全部取消 3.然后进行获取选中的id,进行处理 代码如下: & ...

  7. Linux进程间通信——使用流套接字

    前面说到的进程间的通信,所通信的进程都是在同一台计算机上的,而使用socket进行通信的进程可以是同一台计算机的进程,也是可以是通过网络连接起来的不同计算机上的进程.通常我们使用socket进行网络编 ...

  8. wikioi1688 求逆序对

    题目描述 Description 给定一个序列a1,a2,…,an,如果存在i<j并且ai>aj,那么我们称之为逆序对,求逆序对的数目 数据范围:N<=105.Ai<=105. ...

  9. tomcat root dir log 配置

    tomcat 配置log记录及root 目录

  10. OC基础6:多态、动态类型和动态绑定

    "OC基础"这个分类的文章是我在自学Stephen G.Kochan的<Objective-C程序设计第6版>过程中的笔记. 1.关于SEL类型的数据: (1).SEL ...