Study_note(zb_data)/Error_report (1) 썸네일형 리스트형 Foreign Key 오류 (Cannot add or update a child row : a foreign key constraint fails) 🧷 Error 1452 Error Code: 1452, Cannot add or update a child row : a foreign key constraint fails 🚩 상황 - python으로 aws 환경에 쿼리를 보내는 상황 - execute로 table에 데이터를 추가하는 쿼리를 보내려는데 생긴 에러 ❗ 해결 - foreign key를 무시하도록 처리 (제약조건 無) set foreign_key_checks = 0 # 외래키 무시 set foreign_key_checks = 1 # 외래키 제약조건 작동 - 추후 등록된 데이터 확인 작업 진행, 이상 없음 - 참고 링크 https://hdhdeveloper.tistory.com/61 [MySQL] Error 1452 0 121 Error Cod.. 이전 1 다음