출처: https://m.blog.naver.com/kkson50/221251167091
[문제해결] You are using safe update mode
에러현상Mysql에서 특정한 sql을 실행을 하는데, 아래와 같은 에러가 리턴됨. Error Code: 1175. You a...
blog.naver.com
두개 이상의 Foreign key 로 Delete/update 을 하면 mysql 이 safe-mode 을 작동시킨다. safe-mode 를 끄거나 foreign key 하나만 사용해서 쿼리를 실행해야한다.
출처: https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=jevida&logNo=221123654036
MySQL/MariaDB Table Update Safe 모드
MySQL/MariaDB Table Update Safe 모드 Version : MySQL 5.7 MySQL / MariaDB 에서 ...
blog.naver.com
MySQL/MariaDB Table Update Safe 모드
- Version : MySQL 5.7
MySQL / MariaDB 에서 테이블에 safe update 모드가 설정되어 있는 경우 update 또는 delete 작업 시 key 컬럼에 대한 where 조건이 없으면 아래와 같은 오류가 반환되며, 업데이트를 할 수 없다.
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. |
safe update 모드를 해제하기 위해서는 아래 스크립트를 실행 한다.
SET SQL_SAFE_UPDATES =0; --해제 SET SQL_SAFE_UPDATES =1; --설정 |
'Development > MySQL' 카테고리의 다른 글
[SQL] 비교 표현식 (gt, lt, ge, le, eq, ne) (0) | 2021.11.04 |
---|