2022-12-22
閱讀量:
1346
mysql報錯Error Code: 1175. You are using safe update mode
問題:
mysql報錯1175
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
解答:
這是由于數據庫在安裝之后默認了安全模式,需要更改默認設置。
mysql中的SQL_SAFE_UPDATES變量為了保證數據的安全性,設置了默認值為1。
當SQL_SAFE_UPDATES = 1時,不帶where和limit條件的update和delete操作語句是無法執行的,即使是有where和limit條件但不帶key column的update和delete也不能執行。
當SQL_SAFE_UPDATES = 0時,update和delete操作將會順利執行。
當出現此報錯時,執行SET SQL_SAFE_UPDATES=0; (注意標點符號的英文狀態)






評論(0)


暫無數據
推薦帖子
0條評論
0條評論
0條評論