1、在 MySQL Workbench 中执行 UPDATE 语句,语句如下:
UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider');
2、报错:Error Code: 1175,具体报错信息如下:,如图1
UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider') 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.
3、在 phpMyAdmin 中执行 UPDATE 语句,语句如下:执行成功,如图2
UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider');
4、根据提示,要禁用安全模式,请在 首选项 – >SQL编辑器 中切换选项并重新连接。取消勾选安全更新选项,如图3
Safe Updates (rejects UPDATEs and DELETEs with no restrictions)
5、关闭连接后,重新连接,执行 UPDATE 语句,语句如下:执行成功,如图4
UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider');
UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider') 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/181346.html