Home > Database > Mysql Tutorial > Why Does MySQL Throw Error #1273: 'Unknown Collation 'utf8mb4_unicode_520_ci'' During WordPress Migration?

Why Does MySQL Throw Error #1273: 'Unknown Collation 'utf8mb4_unicode_520_ci'' During WordPress Migration?

Susan Sarandon
Release: 2024-12-25 04:46:27
Original
421 people have browsed it

Why Does MySQL Throw Error #1273:

MySQL Error: #1273 – Unknown Collation 'utf8mb4_unicode_520_ci'

When migrating a WordPress database from a local WAMP server to a live server, users may encounter the error "#1273 – Unknown collation: 'utf8mb4_unicode_520_ci'". This error indicates a mismatch between the MySQL versions running on the two servers.

Solution:

To resolve this issue, follow these steps:

  1. Open the SQL file for the database in a text editor.
  2. Use the find-and-replace feature to replace all instances of 'utf8mb4_unicode_520_ci' with 'utf8mb4_unicode_ci'.
  3. Save the modified SQL file.
  4. Import the modified SQL file into a fresh MySQL database on the live server.

Explanation:

The error occurs because the live server is likely running an older version of MySQL that does not support the 'utf8mb4_unicode_520_ci' collation. Replacing it with 'utf8mb4_unicode_ci', which is a compatible alternative, allows for seamless database operation on both the local and live servers.

The above is the detailed content of Why Does MySQL Throw Error #1273: 'Unknown Collation 'utf8mb4_unicode_520_ci'' During WordPress Migration?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template