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';
- 报错如下:
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运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令。
可以通过以下SQL进行状态查询:
show variables like 'SQL_SAFE_UPDATES';

#解决方法
- 执行下面的sql,关闭
safe-updates模式:
SET SQL_SAFE_UPDATES = 0;
或
SET SQL_SAFE_UPDATES = false;
- 执行下面的sql,打开
safe-updates模式:
SET SQL_SAFE_UPDATES = 1;
或
SET SQL_SAFE_UPDATES = true;
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报错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 ...
- 【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 ...
- 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
错误: Error Code: . You are using safe update mode and you tried to update a table without a WHERE tha ...
- 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语句中正常. 异常内容: ...
- 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 ...
- 更新数据库中数据时出现: 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 ...
- 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 ...
- 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 ...
- 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使用.
随机推荐
- 《前端之路》--- 重温 Koa2
目录 一.简单介绍 二. 路由 三.请求数据 四. 静态资源加载 五. 静态资源加载 六. koa2加载模板引擎 七. koa2 中简单使用 mysql 数据库 八. koa2 中使用单元检测 九. ...
- Dynamics 365 CRM Connected Field Service 不能接收IoT Alert
今天浪费了2,3个小时再connected field service(CFS)上面. 状况如下 1. 在CFS中添加了新的customer assets,并且点击了注册按钮. 2. 注册步骤一直在i ...
- LeetCode-指针法
LeetCode刷题总结-指针法 方法介绍:指针法主要使用在一组按从小到大排好序的数组中,当按照条件查找对应元素时,在数组的前后定义两个指针,当两个指针代表的元素进行运算时:若结果大于目标值,则左移右 ...
- Web自动化测试项目(五)测试结果通知
一.邮件通知 使用第三方邮件发送库yagmail github地址:https://github.com/kootenpv/yagmail 安装 pip3 install yagmail demo.p ...
- Linux守护进程之systemd
介绍 历史上,Linux 的启动一直采用init进程:下面的命令用来启动服务. $ sudo /etc/init.d/apache2 start # 或者 $ service apache2 star ...
- springcloud Eureka设置服务下线上线事件通知
最近由于微服务会莫名其妙挂掉,导致一些服务宕机: 固所以寻找解决办法,莫名宕机暂时还未查明原因,先人肉解决办法 Eureka的server端会发出5个事件通知,分别是: EurekaInstanceC ...
- Redis异常 | DENIED Redis is running in protected mode because protected mode is enabled
背景 今天重新搭了个redis环境,用简单的代码去测试下是否正常, @RunWith(SpringRunner.class) @SpringBootTest public class Springbo ...
- 曹工说Spring Boot源码(15)-- Spring从xml文件里到底得到了什么(context:load-time-weaver 完整解析)
写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...
- 自学Java第三章——《流程控制语句结构》
流程控制语句结构分为: 1.顺序结构:从上到下依次执行 2.分支结构:多个分支选择其中一个分支执行 3.循环结构:重复执行某些代码 3.1 顺序结构 执行过程:从上到下顺序执行 3.1.1 输出语句 ...
- permission denied (publickey)问题的解决和向github添加ssh key
使用ssh key这种方式进行clone ,pull github上面的项目,使用 git clone或者git pull origin master出现permission denied (publ ...