我使用MySQL Workbench 5.2 . 我在DB中有一个名为 user 的表 . 我在MySQL Workbench上的SQL编辑器上执行了以下命令:
UPDATE user SET email = 'abc@yahoo.com' WHERE email='ripon.wasim@yahoo.com';
但不幸的是我收到了以下错误:
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 -> Query Editor and reconnect.
怎么了?非常感谢帮助 .
2 回答
每次在尝试更新mysql中的行时遇到这种错误,都是因为您尝试更新没有使用
KEY
列的WHERE的表 .你可以使用,修复它,
或在WorkBench中
编辑 - >首选项 - > SQL查询
取消选中没有WHERE子句的禁止UPDATE和DELETE语句(安全更新)
查询 - >重新连接到服务器
停用和重新激活更为正确