1. 程式人生 > >如何解決MySQL Workbench中的錯誤Error Code: 1175. You are using safe update mode and you tried to update

如何解決MySQL Workbench中的錯誤Error Code: 1175. You are using safe update mode and you tried to update

錯誤描述

Win7電腦上新安裝了 MySQL Workbench 6.3。開啟後執行一條update語句,總是提示如下錯誤:

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.

解決方法

錯誤提示中提到一句“To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.”我安裝這句英文提示在選單中找了一下,發現如下的解決方法:

選單項Edit → Preferences → 選中左側SQL Editor → 取消複選框 “Safe Updates” Forbid UPDATEs and DELETEs with no key in WHERE clause or no LIMIT clause. Requires a reconnection

修改後的介面如下:

這裡寫圖片描述

重啟 MySQL Workbench 即可。