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 '