标签:
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 */
上面这两条程序执行的话,估计该卷铺盖走人了。
mysql错误:Error Code: 1175. You are using safe update mode and you tried to update a table……
标签:
原文地址:http://www.cnblogs.com/haodaquan/p/5661282.html