使用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.

  1. 在使用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.

  2. 这是因为MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,执行命令SET SQL_SAFE_UPDATES = 0;修改下数据库模式

  3. 为测试命令确实成功执行,我们先看执行update命令前的数据状态

  4. 执行update命令,可以看出命令执行成功的状态

  5. 重新查询数据库值,已经成功更新

  6. 如果想要提高数据库安全等级,可以在恢复回原有的设置,执行命令:SET SQL_SAFE_UPDATES = 1;

  7. 执行成功后,以delete命令为例,非主键情况下又报错了,说明安全等级修改成功

Mysql -update - Error Code: 1175. You are using safe update mode and you tried to update a table wit相关推荐

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

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

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

  4. 执行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 ...

  5. 关于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

  6. 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; )

  7. 【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 错误的 ...

  8. MySQL更新时Error Code:1093和Error Code:1175的解决办法

    Error Code: 1093. You can't specify target table 'ws_product' for update in FROM clause 这个是我们在使用upda ...

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

最新文章

  1. js表单验证,如果不为空时自动改变提交按钮的背景色
  2. 自定义服务器控件ImageButton
  3. mysql允许两个用户远程连接_mysql允许用户远程连接
  4. 阻止JavaScript事件冒泡到父元素
  5. postfix文档修正
  6. leetcode844. 比较含退格的字符串
  7. python测试脚本截图_selenium + python实现截图并且保存图片
  8. 没有串口,如何打印单片机调试信息?
  9. pptx版式验证代码
  10. 不要为了“分库分表”而“分库分表”
  11. Python字典(二)
  12. 封闭期5年的基金属于什么基金?
  13. JSR-303 数据校验学习
  14. 【二分图匹配】E. 过山车
  15. html标记详解博客,HTML表格标记详解8:表格嵌套
  16. 大数据技术成功案例和趋势 2021-25
  17. PHP第一季视频教程.李炎恢.学习笔记(二)(第2章 基本语法(1))
  18. 通信原理电子版_2020兰州大学通信工程考研(电子信息)经验分享
  19. javascript入门到进阶 - js系列一:三种基本的数据结构
  20. 计算机系相声剧本,大学相声剧本:两种学生

热门文章

  1. 如何重置 Docker 里的 gitlab root 用户密码
  2. 微信群 保存到通讯录
  3. Android RoboGuice开源框架、Butter Knife开源框架浅析
  4. jquery选择器详解
  5. 关于在Servlet的路径问题
  6. 跨浏览器的元素的竖直排列
  7. 一条能让 iPhone 崩溃的 app 通知信息
  8. 网络虚拟化叠加的八个用例
  9. Spring+SpringMVC+MyBatis整合基础篇
  10. Spark参数配置说明