공부하는 안경딸기
[MySQL] illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' 본문
[MySQL] illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '='
안경딸기 2021. 10. 7. 23:36Spring에서 프로그램 실행 도중에 illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' 라는 에러를 봤다.
한글이 써져있는 사이트를 뒤적거리다가 DB 설정에서 collation_connection이랑 collation_server 이게 utfmb4_unicode_ci여야 하는데 utfmb4_general_ci여서 라는 글을 봤다.
https://devmanta.tistory.com/300
utfmb4_unicode_ci 설정오류
아래코드를 실행할 때 character-set 오류가 났다. SQL Error [1267] [HY000]: (conn=75317) Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for ope..
devmanta.tistory.com
그래서 바로 DB로 가서 모든 테이블들과 DB자체의 설정을 바꿨다.
그대로 끝인줄 알았다.
근데 오늘 또 또 또 똑같은 에러를 만났다.
그래서 외국 사이트도 뒤져봤다.
그리고 DB 설정 말고도 해결 가능한 방법을 찾았다.
WHERE 절에서 WHERE A COLLATE utf8mb4_general_ci = B 이렇게 적어주면 해결이 바로 된다. 깔꼼
(아래 사이트 참고)
Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
I got this error; Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' I changed "Collations" to "utf8mb4_unicode_ci". Then tables were
stackoverflow.com
'TanTanBody' 카테고리의 다른 글
[MySQL] referencing column 'XXX' and referenced column 'YYY' in foreign key constraint 'ZZZ' are incompatible. (0) | 2021.10.15 |
---|---|
[Retrofit2] retrofit response 가 null, 0 (0) | 2021.10.04 |
[git] hint: Updates were rejected because the remote contains work that you do (0) | 2021.09.30 |
[Spring Boot] Mapper method ... has an unsupported return type: (0) | 2021.09.29 |
[MyBatis] 헛짓한 썰 풀기 (0) | 2021.09.26 |