본문 바로가기

IT/개발

pymysql.err.OperationalError: (1267, "Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='")

 

1. python connect 수정
 - connection with charset=utf8mb4

2. DB 작업
 - SET collation_connection = 'utf8mb4_general_ci';
 - ALTER DATABASE [database] CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 - ALTER TABLE [table] CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;