mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……

今天遇到一个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.

网上查了一下,原来是SET SQL_SAFE_UPDATES设置为1的原因。

解决办法:

执行

SET SQL_SAFE_UPDATES = 0;

执行完毕后,sql语句运营就没有问题了。

完事后最好改回去:

SET SQL_SAFE_UPDATES = 1;

因为 SQL_SAFE_UPDATES 可以防止不安全的sql执行,比如以下sql

delete from table t1 /* where true */;
update t set col=‘ss‘ /* where true */

上面这两条程序执行的话,估计该卷铺盖走人了。

时间: 2024-10-15 10:17:15

mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……的相关文章

MySQL Workbench update语句错误Error Code: 1175.

rom:http://www.tuicool.com/articles/NJ3QRz MySQL update error: 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 Queri

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_content, '/water', '')    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 disabl

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that

转载自: http://blog.csdn.net/amohan/article/details/9980315 快速高效用:SET SQL_SAFE_UPDATES = 0:下面的就不要看了! 今日用MySQL Workbench进行数据库的管理更新时,执行一个更新的语句碰到以下错误提示: Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that us

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 without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences 意思是:在安全更新模式下尝试使用未带关键字的“WHERE”语句,在Preference中切换该选项. SET SQL_SA

Error Code: 1175. You are using safe update

在使用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 Q

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE

1 错误描写叙述 19:15:34 call sp_store_insert(90) 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.0

Error Code: 1175. You are using safe update mode and you tried to update a table

错误描述 11:14:39 delete from t_analy_yhd 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.000 se

mysql 用非主键where语句报错Error Code: 1175.You are using safe update mode and you tried …

1)这是因为MySql运行在safe-updates模式下,该模式会导致非主键条件下无法执行update或者delete命令,执行命令SET SQL_SAFE_UPDATES = 0;修改数据库模式 执行完更新之后再将SET SQL_SAFE_UPDATES 恢复为 1; 2)或者还可以在条件后面加limit语句加以限制.

Error Code: 1175.You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.

在MySQL Workbench里面使用SQL语句: delete from 表名 提示出错: 这是因为设置的是safe update mode,必须跟where. 解决方法有两个: 1. 运行SET SQL_SAFE_UPDATES=0; 2. 打开Edit->Preferences->SQL Queries,取消“Safe Updates”前面的勾.