2022-12-22
阅读量:
1231
mysql报错Error Code: 1175. You are using safe update mode
问题:
mysql报错1175
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. 0.000 sec
解答:
这是由于数据库在安装之后默认了安全模式,需要更改默认设置。
mysql中的SQL_SAFE_UPDATES变量为了保证数据的安全性,设置了默认值为1。
当SQL_SAFE_UPDATES = 1时,不带where和limit条件的update和delete操作语句是无法执行的,即使是有where和limit条件但不带key column的update和delete也不能执行。
当SQL_SAFE_UPDATES = 0时,update和delete操作将会顺利执行。
当出现此报错时,执行SET SQL_SAFE_UPDATES=0; (注意标点符号的英文状态)






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论