问题:由于缺少排序规则,mysqldump将无法导入
1273 - 未知排序规则:'utf8mb4_unicode_520_ci'
Mysql服务器是(来自phpMyAdmin):
Server version: 5.5.40 - MySQL Community
Server charset: UTF-8 Unicode (utf8)
Database client version: libmysql - 5.0.95
这是一个centos 5.11服务器 .
mysql> show variables where Variable_name like 'character\_set\_%' or Variable_n ame like 'collation%';
+--------------------------+-----------------+
| Variable_name | Value |
+--------------------------+-----------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+--------------------------+-----------------+
10 rows in set (0.00 sec)
我有本地服务器(xampp)
> Server version: 10.1.9-MariaDB - binary distribution
> Server charset: UTF-8 Unicode (utf8) Database client version:
> libmysql - mysqlnd 5.0.11-dev - 0503 - $Id:
> 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
这进口罚款 . 查看导入的最终表,我看到所有表的排序规则都是utf8mb4_unicode_ci . 当我上传到公共服务器时,同样的情况发生(即我的本地导入正确)
Server version: 5.6.29 - MySQL Community Server (GPL)
Database client version: libmysql - 5.1.73
Why does my local database handle the 520 collation whereas the centos box does not?
任何指向正确方向的人都会受到赞赏 . 所有上传都是通过上面的规范通过phpMyAdmin执行的 . 我知道我可以“更新”SQL转储并删除'520'引用,只需用utf8mb4_unicode_ci替换,但如果每次都不经常这样做就必须这样做 .
如果觉得《mysql默认排序规则utf8mb4_Mysql字符集和排序规则 - UTF8mb4 520》对你有帮助,请点赞、收藏,并留下你的观点哦!