Execute the update statement in mysql workbench, and report an error: error code: 1175 analysis solution

报错:Error Code: 1175,具体报错信息如下:
1. Execute the update statement in mysql workbench, the statement is as follows:


UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider');


2. Error code: 1175, the specific error information is as follows:, as shown in Figure 1
报错:Error Code: 1175,具体报错信息如下:
Figure 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. Execute the update statement in phpmyadmin, the statement is as follows: the execution is successful, as shown in Figure 2
在 phpMyAdmin 中执行 UPDATE 语句,语句如下:执行成功
Figure 2


UPDATE `cpa_channel_app_source` SET `group_id` = '015ce30b116ce86058fa6ab4fea4ac63' WHERE (`group_id` = 'spider');


4. According to the prompts, to disable Safe Mode, switch options and reconnect in Preferences – >SQL Editor. Uncheck the security update options, as shown in Figure 3
根据提示,要禁用安全模式,请在 首选项 - >SQL编辑器 中切换选项并重新连接。取消勾选安全更新选项
Figure 3


Safe Updates (rejects UPDATEs and DELETEs with no restrictions)


5. After closing the connection, reconnect and execute the update statement, the statement is as follows: the execution is successful, as shown in Figure 4
关闭连接后,重新连接,执行 UPDATE 语句,语句如下:执行成功
Figure 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


 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.