码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-04-28 17:50:28      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:

今天用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就行。

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

标签:

原文地址:http://www.cnblogs.com/jecyhw/p/4463301.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!