user 테이블에서 테스트계정에 admin 권한을 부여하려고 관리자 컬럼을 바꾸려고 했는데 에러가 났다
엄청 간단한 update 문이었는디
update user
set is_admin=1
where email='1';
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 mode를 사용 중인데 where문을 key가 아닌 것으로 걸어서 에러가 났다는 것 같다.
safe mode를 마음대로 끄면 좀 그럴 것 같아서 key column으로 조건을 바꿨다.
update user
set is_admin=1
where user_id=1;
간단하게 해결!
'ERROR' 카테고리의 다른 글
input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. (2) | 2024.05.26 |
---|---|
visual studio에서 실행 시 콘솔 창이 뜨지 않는 경우 (0) | 2024.04.03 |
[Error] Parameter 'e' implicitly has an 'any' type (0) | 2023.08.02 |
[spring] 경고: 유효하지 않은 셧다운 명령 [GET / HTTP/1.1]을(를) 받았습니다. (0) | 2023.07.11 |
[Eclipse-jsp] Some characters cannot be mapped using "ISO-8859-1" ~ (0) | 2023.04.19 |