MySQL 이모지 캐릭터셋 에러

2023. 6. 9. 17:18DB/MySQL

728x90

문제: 

"SQLSTATE[HY000]: General error: 3988 Conversion from collation utf8mb4_unicode_ci into utf8mb3_general_ci impossible for parameter (SQL: insert into `log_error` (`le_message`, `le_code`, `le_file`, `le_line`, `le_trace`, `le_datetime`) values (SQLSTATE[HY000]: General error: 3988 Conversion from collation utf8mb4_unicode_ci into utf8mb3_general_ci impossible for parameter



원인:

 https://bug41.tistory.com/entry/MysqlMariaDB-Insert-%EC%97%90%EB%9F%AC-Incorrect-string-value-xF0x9Fx91xB7xF0x9F-for-column?category=861749 



해결 :
ALTER TABLE 테이블명 MODIFY COLUMN 컬럼 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci

출처: <https://m.blog.naver.com/blackfrost/40168167133

DB 전체 캐릭터셋 바꾸는건 에바같아서
그냥 문제있을법한 칼럼만 수정함



728x90
반응형