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:

find: utf8_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.

e.g. #mysql database < database.sql


Have more questions? Submit a request


Powered by Zendesk