Here is the Error Message I can't import my sql file .
MySQL Import error - Unknown collation: 'utf8mb4_unicode_520ci_'
15.5k views Asked by ShaonPro At
4
There are 4 answers
0

You need to replace charset "utf8mb4" with "utf8" and COLLATE "utf8mb4_unicode_520ci" in your case with "utf8_general_ci".
You can achieve the replacement in MAC with below sed command. In Linux remove ''.
sed -i '' s/utf8mb4_unicode_520ci/utf8_general_ci/g NEW-CLEANED-DUMP.sql
sed -i '' s/utf8mb4/utf8/g NEW-CLEANED-DUMP.sql
You should change collation
utf8mb4_unicode_ci
toutf8_general_ci
. One way to do this is provided here.You can also edit the sql file and replace
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
withENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci