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

【mysql】修改数据时候,抛出safe mode相关错误,处理方法

时间:2018-07-03 15:11:47      阅读:456      评论:0      收藏:0      [点我收藏+]

标签:安全   ble   trie   设置   相关   table   mysql   let   where   

 在mysql5中,可以设置safe mode,比如在一个更新语句中 
UPDATE table_name SET bDeleted=0; 
执行时会错误,报: 
You are using safe update mode and you tried to update a table without a WHERE clause that uses a KEY column.” 

  原因是在safe mode下,要强制安全点,update只能跟where了, 
要取消这个限制,可以: 
    SET SQL_SAFE_UPDATES=0; 
即可 

【mysql】修改数据时候,抛出safe mode相关错误,处理方法

标签:安全   ble   trie   设置   相关   table   mysql   let   where   

原文地址:https://www.cnblogs.com/shangxiaofei/p/9257887.html

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