Focus on cloud service provider activities
Notes on website operation and maintenance

Resolve the "Unknown character set: 'utf8mb4'" error when importing MySQL database

Today, Lao Zuo is preparing to migrate a customer's website to another server, backup the latest web page file and export the database according to normal operations, and then create a site and database in the new server, migrate them to and decompress them. Because the database is small, the PHPMyAdmin tool is directly used for online import, but the error message "# 1115 - Unknown character set: ' utf8mb4 '"。

First, error prompt

 Unknown character set: 'utf8mb4'

It seems that the problem is caused by the database version. I see that the previous version of the website MYSQL5.1 is now MYSQL5.5. Since 5.5, utf8mb4 has been used, while our database version is still the old utf8.

Second, solutions


We use subordinate to open the database, and then change utf8mb4 to utf8

Third, re import MySQL database

 Re import MySQL database

In this way, after we modify the database code again, we can import it into the MySQL database of a higher version. Such problems will be solved.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( three )
Do not reprint without permission: Lao Zuo's Notes » Resolve the "Unknown character set: 'utf8mb4'" error when importing MySQL database

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge