龙岩易富通网络科技有限公司

龙岩小程序开发,龙岩分销系统

mysql workbench 关闭安全更新模式

2019.09.01 | 1698阅读 | 0条评论 | 数据库

使用Mysql workben时候执行update,select,例如下列代码时候,


update student set Sage=0;

update student set age=age+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 Editor and reconnect.


但是使用命令行又一切正常。

这是由于MySQL Workbench打开了安全更新模式。解决方法就是关闭安全更新模式。

解决方法一:

 SET SQL_SAFE_UPDATES = 0;


解决方法二:

1、点击edit->preferences 或者如下图右上角的按钮


20190901205236.png

赞 (

发表评论