📌  相关文章
📜  第 1116 行的错误 1273 (HY000):未知排序规则:'utf8mb4_0900_ai_ci' - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:52.109000             🧑  作者: Mango

代码示例1
MYSQL import issues
Error: ERROR 1273 (HY000) at line 1116: Unknown collation: 'utf8mb4_0900_ai_ci'

1. Export DB:
mysqldump -u root -p DB_NAME > 18_06_21.sql

sed -i 's/utf8mb4/utf8/g' 18_06_21.sql
sed -i 's/utf8_unicode_ci/utf8_general_ci/g' 18_06_21.sql
sed -i 's/utf8_unicode_520_ci/utf8_general_ci/g' 18_06_21.sql
sed -i 's/utf8_0900_ai_ci/utf8_general_ci/g' 18_06_21.sql

2. import DB:
mysql -u root -h HOST_IP -p DB_NAME < 18_06_21.sql