错误:

Error Code: . 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.

这是因为MySQL运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令。或者是更新时没有带条件导致的。

解决方式一:

1、show variables like 'sql_safe%';查看开关状态。

2、执行命令set sql_safe_updates=0;修改下数据库模式

解决方式二:

在更新的语句上加上条件,比如Where 1=1,或者id<>0

参考:

http://www.linuxidc.com/Linux/2015-09/123017.htm

https://www.cnblogs.com/xuancaoyy/p/5814658.html

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 easonjim的更多相关文章

  1. 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 reconn

    使用MySQL执行update的时候报错:   MySQL     在使用mysql执行update的时候,如果不是用主键当where语句,会报如下错误,使用主键用于where语句中正常. 异常内容: ...

  2. 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 ...

  3. 【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 ...

  4. 更新数据库中数据时出现: 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 问题

    使用workbench在数据库中更新数据时报错: You are using safe update mode and you tried to update a table without a WH ...

  5. 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'; ...

  6. mysql更新字段值提示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

    1 引言 当更新字段缺少where语句时,mysql会提示一下错误代码: Error Code: 1175. You are using safe update mode and you tried ...

  7. rror 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 Editor and reconnec

    在mysql5中,可以设置safe mode,比如在一个更新语句中 UPDATE table_name SET bDeleted=0; 执行时会错误,报: You are using safe upd ...

  8. 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 Editor and recon

    数据库默认模式是主键不可进行修改操作,所以需要运行以下语句. SET SQL_SAFE_UPDATES = 0;  -- 出现error1175使用.

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

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

随机推荐

  1. Java中BigInteger类型

    BigInteger是java.math包提供的处理大整数类型,实现了大整数的存储,四则运算,判断素数的方法,求幂,求模,求逆元,求最大公约数等方法.本文主要分析下BigInteger对于大整数的存储 ...

  2. Java JVM 内存空间解析

    运行时数据区: 运行时数据区主要分五块,分别是Method Area , VM Stack , Native Method Stack , Heap , program Counter Registe ...

  3. iOS笔记052- Quartz2D-绘图

      简介 Quartz 2D是一个二维绘图引擎,同时支持iOS和Mac系统 Quartz 2D能完成的工作       绘制图形 : 线条\三角形\矩形\圆\弧等       绘制文字       绘 ...

  4. 静态文本框控件的美化CStatic

    VC通用控件都是灰色,当对程序界面进行美化时,使用通用控件就和美化后的程序界面不搭配,在VB,C#中,可以很方便的更改控件背景颜色,但在VC中就不能,需要我们自己来完善这方面的功能.我在这只简单的介绍 ...

  5. day02_04.算算多少人

    第四题 算算有多少人? 第二题的升级版,看看你能不能做出来 利用你的编程思想去看这道题目,记住不要放过题目的每一个小细节 题目:操场上100多人排队,3人一组多1人,4个一组多2人,5人一组多3人,共 ...

  6. Android数据储存之SQLiteDatabase SQLiteOpenHelper类的简单使用

    SQLiteOpenHelper 简介: SQLiteOpenHelper是一个借口!所以不能直接实例化!那我们想要得到SQLiteOpenHelper对象就需要实现该接口!创建该接口的实现类对象! ...

  7. HDU3232 Crossing Rivers 数学期望问题

    Crossing Rivers                                                                                     ...

  8. 【转】超简单利用UGUI制作圆形小地图

    http://sanwen.net/a/ithhtbo.html 由于UI都是Achor自己用PS做的,比较粗糙,大家见谅,不过丝毫不影响功能的实现,下面我们看看今天的笔记: 首先我们看看需要哪些组件 ...

  9. js作用域的理解

    script:自上而下 全局变量.全局函数 函数:由里到外 浏览器: “JS解析器” 1)“找一些东西”: var function 参数 a = undefine 所有的变量,在正式运行代码之前,都 ...

  10. Codeforces #1063C Dwarves, Hats and Extrasensory Abilities

    题目大意 交互题. 输出平面上的一个点的坐标,交互程序给这个点染色(白或黑). 如此重复 $n$ 次($ 1\le n \le 30$). 要求输出的 $n$ 个点各不相同,并且不论交互程序怎样给它们 ...