MySQL数据库为腾讯云云数据库,版本8.0
采用客户端从公司内网远程连接的方式执行insert和update语句。
连接工具为MySQL WorkBench 8.0 CE
insert语句执行顺利。
update执行报错。

错误提示如下:
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 Edit and reconnect.
大致意思是需要禁用安全模式后执行update。
执行关闭安全模式语句如下:
set sql_safe_updates=0;
再次执行update语句成功。

恢复安全模式语句如下:
set sql_safe_updates=1;

2041

被折叠的 条评论
为什么被折叠?



