[MySQL] collation

DB/SQL 2022. 2. 15. 16:41

- @참고: https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=seuis398&logNo=220851196727

 

 

'DB > SQL' 카테고리의 다른 글

[MySQL] Safe update mode off  (0) 2020.11.10
[PostgreSQL] 설치, 사용자 추가 및 DB 생성, Client Tool  (0) 2020.06.08
블로그 이미지

uchacha

개발자 일지

,

[MySQL] Safe update mode off

DB/SQL 2020. 11. 10. 15:00

- @참고: jun7222.tistory.com/371

 

상황

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.

MySQL에서 default로 column을 delete할 때 where 절을 쓰지 않고는 지워지지 않게 세팅이 되어있다.

이를 바꾸기 위해선 MySQL Safe mode를 off 해줘야 한다.

 

해결

방법1. MySQL Workbench에서 변경하는 방법

Edit > Preferences > SQL Editor 페이지에서 밑에 Safe Updates (rejects UPDATEs and DELETEs with no restrictions) 체크 해제

Query > Reconnect to Server

 

방법2. 쿼리로 변경하는 방법

SET SQL_SAFE_UPdates=0;

 

'DB > SQL' 카테고리의 다른 글

[MySQL] collation  (0) 2022.02.15
[PostgreSQL] 설치, 사용자 추가 및 DB 생성, Client Tool  (0) 2020.06.08
블로그 이미지

uchacha

개발자 일지

,

'DB > SQL' 카테고리의 다른 글

[MySQL] collation  (0) 2022.02.15
[MySQL] Safe update mode off  (0) 2020.11.10
블로그 이미지

uchacha

개발자 일지

,