L
L
ligisayan2016-02-24 18:12:13
MySQL
ligisayan, 2016-02-24 18:12:13

Why am I getting an error when importing a MySQL dump?

Hello! I want to import a database in phpmyadmin. I created, attached a user with all the permissions to it, I go into the created database - import - I select the database dump - I press ok - 1 empty table is created and I get an error, but I don’t know how to solve it:

Ошибка
SQL-запрос:

-- --------------------------------------------------------
--
-- Структура таблицы `wp_aiowps_events`
--
CREATE TABLE IF NOT EXISTS  `wp_aiowps_events` (

 `id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT ,
 `event_type` VARCHAR( 150 ) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT  '',
 `username` VARCHAR( 150 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL ,
 `user_id` BIGINT( 20 ) DEFAULT NULL ,
 `event_date` DATETIME NOT NULL DEFAULT  '0000-00-00 00:00:00',
 `ip_or_host` VARCHAR( 100 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL ,
 `referer_info` VARCHAR( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL ,
 `url` VARCHAR( 255 ) COLLATE utf8mb4_unicode_ci DEFAULT NULL ,
 `event_data` LONGTEXT COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (  `id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci AUTO_INCREMENT =1;

Ответ MySQL: Документация

#1273 - Unknown collation: 'utf8mb4_unicode_ci'

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
Nastya Sukharik, 2016-02-24
@ligisayan

First link on google.
You need MySQL 5.5.3 or higher to support the utf8mb4_unicode_ci collation.
https://wordpress.org/support/topic/sql-error-when...

M
Melkij, 2016-02-24
@melkij

Check the database version.
utf8mb4 only appeared in mysql 5.5.* (emnip, 5.5.3)

E
Eugene, 2016-02-24
@Nc_Soft

Upgrade mysql to >5.5.3 or change utf8mb4_unicode_ci to utf8_general_ci in the dump

V
Vyacheslav Barsukov, 2016-02-25
@slavabars

Change all utf8mb4 to utf8
Change all utf8mb4_unicode_ci to utf8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question