"Go" wordpress Import data error mysql return: #1273 –unknown collation: ' Utf8mb4_unicode_ci '

Source: Internet
Author: User
Tags mysql version

WordPress Web site Transfer server space, through phpMyAdmin Import SQL data error, error message:

MySQL返回:#1273 – Unknown collation:’utf8mb4_unicode_ci’

The approximate meaning is "no defined encoding set UTF8MB4". Search query found that UTF8MB4 is a derivative form of UTF8, utf-8 a character can only support a maximum of 3 bytes, and UTF8MB4 extended to one character support 4 bytes. and UTF8MB4 only when the MySQL database version is 5.5.3+ support, the original version of MySQL Web site is 5.6, the imported MySQL version is 5.0, so there is a #1273 error.

WordPress Official instructions are as long as the database support UTF8MB4 will be a part of the data table encoding upgrade to UTF8MB4, if not supported will not be converted to UTF8MB4 encoding (WordPress 4.4 version support MySQL 5.0+).
Workaround:
Method One: Replace the encoding

Use the Code Editor (Notepad, editplus, etc.) to open the exported SQL data file;

1. Search First:

Utf8mb4_unicode_ci (This is determined by the error code above, which is the single quotation mark in the line of my Blue logo)

To be replaced by:

Utf8_general_ci

2. Find again

Utf8mb4

Replaced by

Utf8

Note: Be sure to replace it in the order above, otherwise it cannot be replaced successfully.

针对第一步,如果你上面的错误编码是什么就把什么替换掉,不一定是utf8mb4_unicode_ci,有可能是utf8_unicode_520_ci,反正都要换成utf8_general_ci

PS: Words superciliousness Blog Through this method to import success, temporarily did not find a problem, but still need to back up the data before the operation.

Method Two: Upgrade the MySQL database to use the website to 5.5.3 or later.

"Go" wordpress Import data error mysql return: #1273 –unknown collation: ' Utf8mb4_unicode_ci '

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.