본문 바로가기

개발(합니다)/시나브로(이슈)

[Mysql] You are using safe update mode

반응형

상황

Mysql에서 데이터를 지우려고 하는데 에러가 발생했습니다.

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나 delete만을 허용하는데

다른 범위의 sql을 적용하려고 하면 workbench에서 경고를 보냅니다.

 

해결 방법

1. 일시적인 Safe모드 해제

아래 쿼리를 실행합니다.

set sql_safe_updates=0;

 

2. workbench의 안전모드 해제

반응형