An error message describes a problem that stops a user or system from completing a task.1273 - Unknown Collation ‘utf8mb4_unicode-520-ci’ is an error message that you get while importing the WordPress database. This error is caused because the local server and live server are running different versions of MYSQL.

Causes :

This error is caused by the difference in encoding types between the source and destination database. The newer SQL database may use uft8mb4, and the older version may use utf8. This process of importing may cause this error. The 520 refers to MYSQL’s Unicode Collation Algorithm 5.2.0. This error may also happen when if you are trying to import MariaDB into MYSQL.

To fix : 

Search and replace database dump file:

Step 1: Open the SQL file in your text editor;

Step 2: Search for: utf8mb4_unicode_ci Replace:uft8_general_ci(Replace All)

Step 3: Search for: utf8mb4_unicode_520_ci Replace:uft8_general_ci(Replace All)

Step 4: Search for: utf8mb4 Replace: uft8(Replace All)

Step 5: Save and upload.

Export Method:

In the case of using phpMyAdmin. Format specification while exporting the database method:

1. From phpMyAdmin, login to the database and just ensure it is the database requirement.

2. Select the export option from the database and choose "custom." 

3. Locate the option Database system or older MySQL server to maximize output compatibility with "MYSQL40".

4. Click on go.

Note: This resolves the unknown collation error. This is very simple one.

SQL File:

Step 1: This is same as text editor method but we do it in a .sql file

Step 2: ENGINE-Inne0DB DEFAULT CHARSET=uft8mb4 COLLATE=utf8mb4_unicode_520_ci;

Step 3: In your .sql file, and swapping it with

Step 4: ENGINE-Inne0DB DEFAULT CHARSET=uft8 COLLATE=utf8_general_ci;
Was this answer helpful? 2 Users Found This Useful (2 Votes)