Mysql -update - Error Code: 1175. You are using safe update mode and you tried to update a table wit
使用MySQL执行update的时候报错: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.
在使用mysql执行update的时候,如果不是用主键当where语句,会报如下错误,使用主键用于where语句中正常。
异常内容: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.
这是因为MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,执行命令SET SQL_SAFE_UPDATES = 0;修改下数据库模式
为测试命令确实成功执行,我们先看执行update命令前的数据状态
执行update命令,可以看出命令执行成功的状态
重新查询数据库值,已经成功更新
如果想要提高数据库安全等级,可以在恢复回原有的设置,执行命令:SET SQL_SAFE_UPDATES = 1;
执行成功后,以delete命令为例,非主键情况下又报错了,说明安全等级修改成功
Mysql -update - Error Code: 1175. You are using safe update mode and you tried to update a table wit相关推荐
- Error Code: 1175. You are using safe update mode and you tried to ......
MySQL提示的错误信息: Error Code: 1175. You are using safe update mode and you tried to update a table witho ...
- Error Code: 1175. You are using safe update...
报错日志 Error Code: 1175. You are using safe update mode and you tried to update a table without a WHER ...
- 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 ...
- 执行update和delete的SQL语句时,报错:Error Code: 1175. You are using safe update mode and you tried to update a
执行SQL语句时,报错: 13:36:42 delete from users where username='lisi' Error Code: 1175. You are using safe u ...
- 关于mysql出现delete from student where `stu_id` = '1' Error Code: 1175. You are using safe update错误
两个解决办法, 一: 修改mysql 的preference选项 上图: 选中edit,选择preference属性 二, 使用SET SQL_SAFE_UPDATES = 0
- mysql 报错:Error Code: 1175. You are using safe update mode and you tried...
解决方法: 关闭safe-updates模式 SET SQL_SAFE_UPDATES = 0; (如果需要重新打开: SET SQL_SAFE_UPDATES = 1; )
- 【MySQL】Error Code: 1093. You can‘t specify target table ‘xxx‘ for update in FROM clause
1. 报错信息: Error Code: 1093. You can't specify target table 'self_check' for update in FROM clause 错误的 ...
- MySQL更新时Error Code:1093和Error Code:1175的解决办法
Error Code: 1093. You can't specify target table 'ws_product' for update in FROM clause 这个是我们在使用upda ...
- SQL Editor and reconnect【mysql(workbench)更新数据时候的一个异常】【Error Code:1175】
异常情况: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHE ...
最新文章
- js表单验证,如果不为空时自动改变提交按钮的背景色
- 自定义服务器控件ImageButton
- mysql允许两个用户远程连接_mysql允许用户远程连接
- 阻止JavaScript事件冒泡到父元素
- postfix文档修正
- leetcode844. 比较含退格的字符串
- python测试脚本截图_selenium + python实现截图并且保存图片
- 没有串口,如何打印单片机调试信息?
- pptx版式验证代码
- 不要为了“分库分表”而“分库分表”
- Python字典(二)
- 封闭期5年的基金属于什么基金?
- JSR-303 数据校验学习
- 【二分图匹配】E. 过山车
- html标记详解博客,HTML表格标记详解8:表格嵌套
- 大数据技术成功案例和趋势 2021-25
- PHP第一季视频教程.李炎恢.学习笔记(二)(第2章 基本语法(1))
- 通信原理电子版_2020兰州大学通信工程考研(电子信息)经验分享
- javascript入门到进阶 - js系列一:三种基本的数据结构
- 计算机系相声剧本,大学相声剧本:两种学生