WordPress Import Database Appears "Unknown collation: ' Utf8mb4_unicode_ci" wrong solution _ database Other

Source: Internet
Author: User
Tags vps import database phpmyadmin

Starting with the WordPress4.2 version, if the data encoding that we exported in the MYSQL5.1 version is in UTF8MB4 format, if we move the site to recover the data, when the MYSQL5.5 and other high version databases are imported into the MYSQL5.1 low version, there will be " Unknown collation: "Utf8mb4_unicode_ci" error problem, there was no such problem before, from the beginning of WP4.2.

To solve this problem, if we use the vps/server, it can be similar to the old left yesterday in the "Linux CentOS6 environment MySQL5.1 upgrade to MySQL5.5 version of the process" method to upgrade the MySQL database version, so there will be no incompatibility issues, But if we use a virtual host or upgrade MySQL exist some technical work, if the process of error is really more trouble. We can choose a compatible version here when we export the database.

First, backup data

Before we upgrade and import data, we need to back up the site data in the existing host/server.

Second, export the compatible version database

When we go into phpmyadmin, we export the database and look at the following interface.

Troubleshoot wordpress Import Database "Unknown collation: ' Utf8mb4_unicode_ci" error

Starting with the WordPress4.2 version, if the data encoding that we exported in the MYSQL5.1 version is in UTF8MB4 format, if we move the site to recover the data, when the MYSQL5.5 and other high version databases are imported into the MYSQL5.1 low version, there will be " Unknown collation: "Utf8mb4_unicode_ci" error problem, there was no such problem before, from the beginning of WP4.2.

To solve this problem, if we use the vps/server, it can be similar to the old left yesterday in the "Linux CentOS6 environment MySQL5.1 upgrade to MySQL5.5 version of the process" method to upgrade the MySQL database version, so there will be no incompatibility issues, But if we use a virtual host or upgrade MySQL exist some technical work, if the process of error is really more trouble. We can choose a compatible version here when we export the database.

First, backup data

Before we upgrade and import data, we need to back up the site data in the existing host/server.

Second, export the compatible version database

When we go into phpmyadmin, we export the database and look at the following interface.

Select the custom export method.

Looking at the graph, select MYSQL40 in the maximum compatible database options, and then export the database we can import into the lower version of MySQL is no problem. If there is a garbled problem, we will:

Copy Code code as follows:

Define (' Db_charset ', ' utf8mb4 ');

Change into

Copy Code code as follows:

Define (' Db_charset ', ' utf-8 ');

Because UTF8MB4 need to be compatible in more than 5.5 versions, if we are a new installation of the VPS site environment, it is recommended to install/upgrade MySQL directly to 5.5 and above version, so that there is no such problem.

The above content is this article to introduce to everybody about the WordPress import Database to appear "Unknown collation: ' Utf8mb4_unicode_ci" wrong solution, hope to be helpful to everybody.

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.