phpmysql 错误 - #1273 - #1273 - 未知排序规则:'utf8mb4_general_ci'

2022-01-05 00:00:00 php mysql phpmyadmin collation

我刚刚安装了 PhpMyAdmin v4.1.5 只有英文版

I have just installed PhpMyAdmin v4.1.5 English only

我已将其设置为访问 2 台服务器 - 本地一台在我的 PC 上,另一台在我的服务器上

I have set it up to access 2 servers - the local one on my PC and the remote one on my server

我的本​​地 PC 一切正常,但是当我登录到远程服务器时,我收到消息

All is fine for my local PC but when I log in to my remote server I get the message

错误

MySQL 说:

#1273 - 未知排序规则:'utf8mb4_general_ci'

#1273 - Unknown collation: 'utf8mb4_general_ci'

搜索 PhpMyAdmin 代码会在 DatabaseInterface.class.php 中找到一个对此的引用

Searching the PhpMyAdmin code finds one reference to this in DatabaseInterface.class.php

        if (PMA_MYSQL_INT_VERSION >  50503) {
            $default_charset = 'utf8mb4';
            $default_collation = 'utf8mb4_general_ci';
        } else {
            $default_charset = 'utf8';
            $default_collation = 'utf8_general_ci';
        }

不知道这是什么,但它似乎正在设置默认字符集 &校对错误

No idea what this is but it seems to be setting the default charset & collation wrongly

推荐答案

This解决方案对我有用

1) 单击数据库的导出"选项卡

1) Click the "Export" tab for the database

2) 点击自定义"单选按钮

2) Click the "Custom" radio button

3) 转到标题为特定格式选项"的部分,并将数据库系统或较旧的 MySQL 服务器以最大限度地提高输出兼容性:"的下拉列表从 NONE 更改为 MYSQL40.

3) Go the section titled "Format-specific options" and change the dropdown for "Database system or older MySQL server to maximize output compatibility with:" from NONE to MYSQL40.

4) 滚动到底部并点击GO".

4) Scroll to the bottom and click "GO".

如果它与 wordpress 相关,更多信息关于它为什么是正在发生.

If it's related to wordpress, more info on why it is happening.

相关文章