Programming/MySQL
MySQL workbench safe mode 해제하기
leverage
2017. 10. 4. 22:29
Error Code: 1175. You are using safe mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode.
MySQL workbench에서 table을 UPDATE나 DELETE할 때 where 조건절을 쓰지 않고 할 경우 위처럼 에러코드 메시지가 나오면서 쿼리를 수행하지 않게됩니다.
MySQL Safe mode off
Edit - Preferences 클릭
SQL Editor - Safe Updates 체크 박스 해제한 후 OK 눌러주세요.
마지막으로, Query - Reconnect to Server를 클릭하고 나면 UPDATE, DELETE를 사용할 수 있습니다.
또는 아래 쿼리를 입력하면 위 설정 상관없이 바로 해제가능합니다.
SET SQL_SAFE_UPDATES = 0;
출처 : https://stackoverflow.com/questions/11448068/mysql-error-code-1175-during-update-in-mysql-workbench