MYSQL SAFE UPDATE MODE

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进行更新或者删除操作时,会有这个错误提示

原因是因为MySQL Workbench 默认是有一个安全更新模式,没有使用主键作为where的条件

解决办法:

1.执行语句手动关闭安全更新模式

SET SQL_SAFE_UPDATES = 0;

2.在Workbench设置中关闭安全更新模式

将Safe Updatas 勾选取消,即可关闭安全更新模式

猜你喜欢

转载自blog.csdn.net/qq_40938301/article/details/82255187