当mysql 数据库出现这种问题:
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进入了安全模式,即safe-updates模式
解决办法:
SHOW VARIABLES like 'sql_safe_updates'; # 查询当前safe-updates模式的状态
SET sql_safe_updates=0; # 关闭safe-updates模式
当遇到MySQL错误1175,提示在safe-updates模式下尝试更新表而未使用WHERE子句时,可以按照以下步骤解决:首先检查当前safe-updates模式的状态,然后通过SQL命令关闭该模式。关闭方法为执行`SET sql_safe_updates=0;`,重新连接数据库后即可正常执行更新操作。
391

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



