#1273 – Unknown collation: ‘utf8mb4_unicode_ci’ in localhost or Cpanel

There is a comomn problem that we all faced that You will face this type of error >> ” #1273 – Unknown collation: ‘utf8mb4_unicode_ci'” When we try to export and import Database in different envirment. The following technique is more effective than any other (I thinking..)..

First export your database to .sql, open it on sublime text / Notepad++ and go to “Replace”. Then just replace “utf8mb4” with “utf8” for all. It will replace the “utf8mb4_unicode_ci” to “utf8_unicode_ci” .

Now go to your Database in PhpMyadmin and set the DB collation to utf8_unicode_ci (Operations > Collation).

N.B: you can also replace the whole Collation with your disired collation.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s