When trying to import MySQL dumps from newer servers to older servers you may get:
1 |
Unknown collation: 'utf8mb4_unicode_ci' |
or:
1 |
Unknown collation: 'utf8mb4_unicode_520_ci' |
The quick and dirty solution is to do a search and replace on the database dump changing “utf8mb4_unicode_ci” and “utf8mb4_unicode_520_ci” to “utf8_unicode_ci”.
This can be accomplished with sed:
1 2 |
sed -i 's/utf8mb4_unicode_520_ci/utf8_unicode_ci/g' your_file.sql sed -i 's/utf8mb4/utf8/g' your_file.sql |