今天用mysql workbench在更新数据的时候,出现了下面错误:
15:52:39    update wp_posts set post_content = replace(post_content, '/water', '')    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
解决办法:在更新之前加上下面这句即可。
SET SQL_SAFE_UPDATES = 0;

或者按照提示在打开菜单的Edit->Preferences,

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

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

在重启mysql就行。

相关文章:

  • 2022-12-23
  • 2021-03-31
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-09-30
猜你喜欢
  • 2021-08-09
  • 2021-10-18
  • 2022-01-20
  • 2021-06-10
  • 2022-02-15
  • 2021-10-21
相关资源
相似解决方案