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 Editor and reconnect.

Winter

2020-06-16

MySql执行Update语句报错了

10:10:35	update tb_feature set title='JavaScript' where title like "%javascript%"	
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 reconnect.	0.066 sec

第4255篇《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 Editor and reconnect.》来自Winter(https://github.com/aiyld/aiyld.github.io)的站点

1个回答
Winter 2020.06.16

这个问题有两个处理方式:

  1. 先执行下面语句后再去执行你的sql
SET SQL_SAFE_UPDATES = 0;

2. 打开Workbench的菜单[Edit]->[Preferences...]切换到[SQL Editor]页面把[Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)]之前的对勾去掉点击[OK]按钮最后一步记得要重启一下Workbench,否则你仍然会得到这个错误提示

问题类别

JavaScript Ckeditor Python Webpack TypeScript Vue.js React.js ExpressJS KoaJS CSS Node.js HTML Django 单元测试 PHP Asp.net jQuery Bootstrap IOS Android