Home > Database > Mysql Tutorial > Why Does MySQL Throw an 'Unknown Collation 'utf8mb4_unicode_520_ci'' Error After Database Migration?

Why Does MySQL Throw an 'Unknown Collation 'utf8mb4_unicode_520_ci'' Error After Database Migration?

Barbara Streisand
Release: 2024-12-20 11:44:17
Original
595 people have browsed it

Why Does MySQL Throw an

MySQL Error: Unknown Collation 'utf8mb4_unicode_520_ci'

Question:

Upon migrating a WordPress database from a local WAMP server to a live server, users encounter the error:

Answer:

This error typically arises when the local and live servers utilize different versions of MySQL. To rectify the issue:

  1. Open the SQL file in a text editor.
  2. Perform a find and replace operation: Replace all instances of utf8mb4_unicode_520_ci with utf8mb4_unicode_ci.
  3. Save the modified SQL file.
  4. Upload the updated file to a fresh MySQL database.

Alternatively, you can refer to the screenshot provided for visual guidance:

[Image of text editor with find and replace operations being performed]

The above is the detailed content of Why Does MySQL Throw an 'Unknown Collation 'utf8mb4_unicode_520_ci'' Error After Database 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