Monday, 9 July 2018

How To: Fix Unknown collation: 'utf8_unicode_520_ci'

If your MySQL server does not support the collation: 'utf8_unicode_520_ci', this can easily be fixed by running a single command on the database, before importing it to MySQL.
# sed -i 's/utf8_unicode_520_ci/utf8_unicode_ci/g' database.sql
(Where database.sql is the name of the database file)

If you aren't confident using the command line, you can simply open the .sql file in a text editor such as Notepad++, and use the 'find and replace' tool:

findutf8_unicode_520_ci
replace utf8_unicode_ci

Once all instances of utf8_unicode_520_ci  have been replaced with utf8_unicode_ci, you should then be able to import the database as normal.

No comments:

Post a Comment