Unknown collation: 'utf8mb4_unicode_ci' - How to fix?

Cheerag Nundlall

Well-known member
Joined
Oct 12, 2016
Messages
115
Best answers
0
Ratings
4
Points
18
#1
I created a backup file .sql from my hosting control panel and when i imported it into phpmyadmin, i am getting this error and i could not import successfully. Does anyone know how to fix this error?

Error
SQL query:

CREATE TABLE `wp_commentmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `comment_id` (`comment_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

MySQL said:

#1273 - Unknown collation: 'utf8mb4_unicode_ci'
 

Attachments

Chris Worner

Well-known member
Joined
Apr 15, 2016
Messages
381
Best answers
1
Ratings
37
Points
28
#2
It is easy to fix by clicking on Operations of your Mysql database, find Collation

operations.jpg

and change to this

utf8.jpg

In your database file, you also need to change this

/*!40101 SET NAMES utf8mb4 */;

to this

/*!40101 SET NAMES utf8 */;

Your problem will be solved, hope it helped.
 

Bryan McClure

Well-known member
Joined
Jul 20, 2016
Messages
200
Best answers
0
Ratings
18 1
Points
18
#4
Simply do this:

Open your database file and find utf8mb4 replace with utf8

Change
/*!40101 SET NAMES utf8mb4 */;
to
/*!40101 SET NAMES utf8 */;

Just that and you could import database.

Hope that helps.
 
Recommended Threads
Similar Threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top