今天遇到一个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. [Linked List]Convert Sorted List to Binary Search Tree

    Total Accepted: 57775 Total Submissions: 198972 Difficulty: Medium Given a singly linked list where ...

  2. Unicode-字符编码的历史由来(转)

    http://www.nowamagic.net/internet/internet_CharsetHistory.php 很久很久以前,有一群人,他们决定用8个可以开合的晶体管来组合成不同的状态,以 ...

  3. Struts2 校验

    Struts2校验格式: actionName-methodName-invalidation.xml  该配置文件必须和action类在同一个包下. <?xml version="1 ...

  4. ORACLE触发器和new、old特殊变量

    :new --为一个引用最新的列值;:old --为一个引用以前的列值; 这两个变量只有在使用了关键字 "FOR EACH ROW"时才存在.且update语句两个都有,而inse ...

  5. 常量 - PHP手册笔记

    常量语法 常量在脚本执行期间其值不能改变.常量大小写敏感,传统上常量标识符总是大写.常量一旦定义就不能被重新定义或取消定义,常量的值只能是标量. 可以用define()函数来定义常量,也可以使用con ...

  6. Android小记之--android:listSelector

    使用ListView和GridView时,经常使用android:listSelector来使item被选中时的状态.但如果不配合android:drawSelectorOnTop来使用可能达不到想要 ...

  7. 构建混合云:配置Azure site to site VPN连接(1)

      用户在构建自己云计算解决方案的时候,往往会选择私有云或者公有云来做部署,但在一些场景下,用户更加希望通过混合云的方案来满足自己的业务需求.Azure为混合云的部署提供多种不同的连接方案,最常见的是 ...

  8. 高龄“潮男”优衣库老板柳井正_榜样_奢华主义_YOKA时尚网

    高龄"潮男"优衣库老板柳井正_榜样_奢华主义_YOKA时尚网 高龄"潮男"优衣库老板柳井正

  9. 网站服务管理系统wdcp简介及功能特性

    WDCP是WDlinux Control Panel的简称,是一套用PHP开发的Linux服务器管理系统以及虚拟主机管理系统,,旨在易于使用Linux系统做为我们的网站服务器,以及平时对Linux服务 ...

  10. sql server中的 stuff 函数

    STUFF eg: SELECT stuff(12345,3,1,'-') result:    12-45 以下文段来自:http://www.cnblogs.com/lingxyd/archive ...