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!
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. Download and install NotePad++ or a code editor of your choice.
- 2. Right-click on the database file and click on Edit with Notepad++.
-
- 3. Press the Ctrl key together with the F key on your keyboard to open up the Find box.
-
- 4. Click on the Replace tab.
-
- 5. In the Find what: box enter utf8mb4_unicode_520_ci
In the Replace with: box enter utf8mb4_unicode_ci
- 5. In the Find what: box enter utf8mb4_unicode_520_ci
-
- 6. Press the Replace All button.
- 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.
Did you manage to fix the annoying “unknown collation utf8mb4_unicode_520_ci” error?
Thank You so much ..
Thank You so much, Dear, it’s working.
God bless you.
No problemo!
Thank you very much everything was fixed using these steps.
My pleasure! Glad it helped!
Thanks billion. It saved me a lot of mess
No problem! 🙂
Glad this post was helpful.
Thanks alot. Simple and easy. It works so perfect.
God bless your. In Jesus’ Mighty name
I’m glad this post helped you out 🙂
Great, thanks
Thanks for your feedback Rubb.
Glad it worked for you 🙂
Brilliant! Quick & simple solution to a real roadblock! Thanks a lot .
Glad it was helpful Surendra 🙂
Thank you very much.
My pleasure! 🙂
Thanks !! It worked like a charm 🙂 (y)
Great to hear Rimpy 🙂
Enjoy!
Brilliant! Quick & simple solution to a real roadblock! Thanks for sharing.
My pleasure Tony.
Thank you for great feedback!
You are Sir, ar a life safer. Thank so so much.
Thanks for your feedback Eb’rahim!
I really appreciate it 🙂
You are a life saver sir! Worked like a charm, and very simple. I was working for a friend how moved his wordpress site and the hosting company did a sloppy job migrating the site. Thank you!
My pleasure John 🙂
so many thanks!
My pleasure Leo!
The issue is a big pain the in ass!