Illegal mix of collations error after upgrading Flyway version from 10.9.1 to 11.11.2
Author: lucasslimaCreated Sep 1, 2025Updated Sep 23, 2026
Labelss: waiting for feedback
Hi,
We recently tried to upgrade the Flyway version we use for our migrations, and we started having the following issue:
SEVERE: Failed to execute script ***
----------------------------------------------------------------
SQL State : HY000
Error Code : 1267
Message : (conn=9) Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
***
Line : 53
Statement : Run Flyway with -X option to see the actual statement causing the problem
Caused by: Failed to execute script ***We even tried to set flyway.initSql=SET collation_connection='utf8mb4_unicode_ci'; in the configuration to no effect.
However, when rolling back the version the issue disappears. Was there any changes that could cause this? Is there anything we can change in the documentation that we can add to fix it? Thanks!
Source: flyway/flyway