[MySQL] Error Code: 1175. You are using sage update mode

0

에러 코드

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.



발생 원인

update article
set id = 1
where id IS NULL; 

에서 where id IS NULL; 에 대해 에러 발생

  • 어떤 행을 삭제하거나 수정하려할 때 나오는 에러인데, 삭제 / 수정시에는 Key 열을 이용해서만 가능하도록 설정되어 있기 때문이다.
  • 안전 모드를 해제하자


[방법 1]

  • 일시적인 safe모드 해제
  • set sql_safe_updates=0;



[방법 2]

  • 항상 safe모드 해제
  • Edit - Preferences
  • safe Updates 체크 해제
  • workbench 다시 시작
profile
초심 잃지 않기

0개의 댓글