MYSQL - Unknown collation: utf8mb4_unicode_520_ci

MySql error - Unknown collation: utf8mb4_unicode_520_ci

Error is caused because of the conflict of different versions of MySQL Best option would be to update MySQL to match between environments but something we don't have that option.

Quick fix is to replace the collation using the command below

sed -i 's/utf8mb4_unicode_520_ci/utf8mb4_unicode_ci/g' file.sql

Very often I've had this error when migrating WordPress sites between hostings.

If you want a hassle-free WordPress hosting or maintenance plans go to wordpress.rootscope.dev