How To Fix The Error “unknown collation utf8mb4_unicode_520_ci” in phpmyAdmin

By October 18, 2016 June 13th, 2019 Webite

If you are trying to import an SQL database into phpmyAdmin and receiving the error #1273 – unknown collation ‘utf8mb4_unicode_520_ci’ then you have come to the right place!

How To Fix "unknown collation utf8mb4_unicode_520_ci" Error

This error was a real pain in the ass to fix because all of solutions I found on stackoverflow and on other websites did not work or caused the WordPress site to change.

The cause of this issue is when export a database from MySQL 5.5.3 or newer which uses utf8mb4 encoding to an older version that uses utf8.

The best solution is to upgrade the older version of MySQL, but this is not always an option.
Alternatively, you can use the method below to import your database without receiving the #1273 – unknown collation β€˜utf8mb4_unicode_520_ci’ error.

 

How To Fix “unknown collation utf8mb4_unicode_520_ci” Error:

    1. 1. Download and install NotePad++ or a code editor of your choice.
    2. 2. Right-click on the database file and click on Edit with Notepad++.

Database - Edit With Notepad ++

    1. 3. Press the Ctrl key together with the F key on your keyboard to open up the Find box.

 

    1. 4. Click on the Replace tab.

Database - Edit With Notepad++ Replace

 

    1. 5. In the Find what: box enter utf8mb4_unicode_520_ci
      In the Replace with: box enter utf8mb4_unicode_ci

Database - NotePad++ Find and Replace

 

    1. 6. Press the Replace All button.

Database - Edit With Notepad++ Replace All

  1. 7. Save the file and import it into phpmyAdmin.

If you are getting an error saying that the Table already exists, then you will need to drop the tables that were imported on your first attempt before importing your edited version.

Database unknown collation utf8mb4_unicode_520_ci Drop Tables

Did you manage to fix the annoying “unknown collation utf8mb4_unicode_520_ci” error?

You may also be interested in…

Free Marketing Book!

DotComeSecrets Book Free
Summary: This legendary Free book is a must read for any digital marketer or business owner!
Click here for more information.

How To Make Money Online With Affiliate Marketing

How To Make Money Online With Affiliate MarketingA step-by-step guide that will teach you how to make money online with affiliate marketing. This is something anyone can do!

24 Comments

Leave a Reply to Zaw Min Oo Cancel Reply

 

Do NOT follow this link or you will be banned from the site!