错误:

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. 【IPv6】ISATAP隧道技术详解

    一.基本概念       ISATAP(Intra-SiteAutomatic Tunnel Addressing Protocol)    ISATAP是一种非常容易部署和使用的IPv6过渡机制.在 ...

  2. Windows网络编程笔记3 ---- 邮槽和命名管道

    邮槽和命名管道的使用方法也很简单,只需几个有限的函数就可以实现双方的通信. 第三.邮槽 邮槽----进程间通信机制. 通过邮槽客户进程可以将消息通过广播给一个或多个服务进程.这是一个单向通信机制,缺点 ...

  3. python-侦测系统

    大概就是这样 要求 告警需要一定之间内出现多次 然后才报警一次 如果恢复 必须发送恢复的信息

  4. CSU-1982 小M的移动硬盘

    CSU-1982 小M的移动硬盘 Description 最近小M买了一个移动硬盘来储存自己电脑里不常用的文件.但是他把这些文件一股脑丢进移动硬盘后,觉得这些文件似乎没有被很好地归类,这样以后找起来岂 ...

  5. jQuery操作DOM基础 - 创建节点

    案例:创建两个<li>元素节点,并且作为<ul>元素节点的子节点,添加到DOM树中 <!DOCTYPE html> <html lang="en&q ...

  6. How to modify a compiled Android application (.apk file)

    Today I’d like to share with you my findings about how an existing .apk file can be modified. An .ap ...

  7. vim configure

    vim configure .vimrc " An example for a vimrc file. " " Maintainer: Bram Moolenaar &l ...

  8. hihoCoder #1763 道路摧毁

    题目大意 A 国一共有 $n$ 个城市且有 $n-1$ 条双向道路,且任意两个城市都可以通过道路互相到达. 现在 B 国给出了两个城市的集合 $X,Y$,你需要摧毁若干条 A 国的道路,使得任意一个在 ...

  9. eclspse魔板

    window->prefence->搜索 template即可

  10. linux命令 显示文件内容

    通过命令+文件名查看内容.如下命令可以查看.1, cat :由第一行开始显示文件内容:2,tac:从最后一行开始显示,可以看出tac与cat字母顺序相反:3,nl:显示的时候输出行号:4,more:一 ...