Solve the MySQL database import prompt \\"utf8mb4

888u

Last update at :2024-06-16,Edit by888u

Today I met a netizen who told Snail that when he backed up the website database and imported it to another VPS host environment site, he got an error that the database could not be imported. So Snail helped to solve this problem. According to the database information provided by netizens, I directly tried to import using the mysql command, and then was prompted with \\"ERROR 1273 (HY000) at line 93: Unknown collation: \\'utf8mb4_unicode_520_ci\\'\ \"Error message.

Then I backed up the database again in his original server, and then imported it again, and the same problem still occurred. This should be caused by a database compatibility issue. The original server's MYSQL version was 5.6, but now the server's version is 5.5. It should be a compatibility issue. Open the SQL database file directly with an editor, and the encoding needs to be replaced.

Snail has also shared two articles about database import encoding issues before:

1. Solve the problem of \\”Unknown character set: \\’utf8mb4\\’\\” when importing MySQL database

2. Solve the WordPress import database \\”Unknown collation: \\’utf8mb4_unicode_ci\\” error

This time we encountered the problem of utf8mb4_unicode_520_ci prompt error. Here we use this method to solve it.

Solution:

Replace all \\"utf8mb4_unicode_520_ci\\" characters in the database with \\"utf8mb4_unicode_ci\\", and then import them so there are no errors.

PS: Before replacing, we remember to make a backup copy first so that we can recover after making an error.

Recommended site search: Hong Kong server, foreign server rental US attack-proof server, mobile server hosting, US multi-ip site group vps, free website space, server high defense Hong Kong, how long does it take to register a website, Japanese server website, domain name purchase,

Solve the MySQL database import prompt \\

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码