Unknown collation: 'utf8mb4_unicode_ci' - How to fix?

Cheerag Nundlall

Well-known member
Registered
Joined
Oct 12, 2016
Messages
336
Points
18
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
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
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
Registered
Joined
Jul 20, 2016
Messages
271
Points
18
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.
 
Latest Threads
Replies
0
Views
49
Replies
0
Views
192
Replies
0
Views
85
Replies
0
Views
82

Latest Hosting OffersNew Reviews

Sponsors

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