如何解决MySQL Workbench中的错误Error Code: 1175
错误描述:
在MySQL Workbench8.0中练习SQL语句时,执行一条update语句,总是提示如下错误:
Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY columnTo disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.
解决方法
错误提示中提到一句“To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.”我安装这句英文提示在菜单中找了一下,发现如下的解决方法:
菜单项Edit → Preferences → 选中左侧SQL Editor → 取消复选框 “Safe Updates” Forbid UPDATEs and DELETEs with no key in WHERE clause or no LIMIT clause. Requires a reconnection
将Safe Updates对勾取消后,重启 Workbench即可。
漫思