#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci

2019-01-12 17:40发布

I have a WordPress website on my local WAMP server. But when I upload its database to live server, I get error

#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’

Any help would be appreciated!

8条回答
\"骚年 ilove
2楼-- · 2019-01-12 18:16

In my case it turns out my
new server was running MySQL 5.5,
old server was running MySQL 5.6.
So I got this error when trying to import the .sql file I'd exported from my old server.

MySQL 5.5 does not support utf8mb4_unicode_520_ci, but
MySQL 5.6 does.

Updating to MySQL 5.6 on the new server solved collation the error !

If you want to retain MySQL 5.5, you can:
- make a copy of your exported .sql file
- replace instances of utf8mb4unicode520_ci and utf8mb4_unicode_520_ci
...with utf8mb4_unicode_ci
- import your updated .sql file.

查看更多
趁早两清
3楼-- · 2019-01-12 18:16

find and replace:

utf8mb4_unicode_520_ci

with

utf8_general_ci

in whole sql file

查看更多
登录 后发表回答