#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’

Some time we get the error #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’ when we import the database on different server. This issue occurred due to difference MySQL version.

To fix this problem We have to find the below:
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

and replace with this code:
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

We can also apply the below to solve this problem

Open the database sql file in text editor and

1. Fine: utf8mb4_unicode_ci Replace: utf8_general_ci (Replace All)

2. Find: utf8mb4_unicode_520_ci Replace: utf8_general_ci (Replace All)

3. Find: utf8mb4 Replace: utf8 (Replace All)

Tags:

Leave a Reply