Page 1 of 1

Error: Unknown collation while importing SQL dump file

Posted: Wed Nov 09, 2022 10:40 am
by isscbta
If you run:

Code: Select all

mysql user_database_name < dump_of_database.sql
And get this error:

Code: Select all

ERROR 1273 (HY000) at line 352838: Unknown collation: 'utf8mb4_0900_ai_ci'
To fix this, run the following:

Code: Select all

sed -i "s/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g" dump_of_database.sql
After that, rerun:

Code: Select all

mysql user_database_name < dump_of_database.sql
That's all Folks!