[wordpress插件] Database Collation Fix数据库排序规则修复

wordpress 插件 文章 2020-04-12 19:41 503 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Since version 4.2, WordPress has been detecting the MySQL version and if it’s version 5.5.3 or greater, automatically selecting the ‘utf8mb4_unicode_520_ci’ Collation Algorithm.

从4.2版开始,WordPress一直在检测MySQL版本,如果它是5.5.3版或更高版本,则会自动选择“ utf8mb4_unicode_520_ci”整理算法。

This works well until you need to migrate your database to an older version of MySQL that does not support the utf8mb4 algorithms.

在您需要将数据库迁移到不支持utf8mb4算法的较早版本的MySQL之前,此方法效果很好。

Then, you run into the error message: “#1273 ?

然后,您遇到错误消息:“#1273吗?

Unknown collation: ‘utf8mb4_unicode_520_ci'” when importing your database.

导入数据库时​​,未知排序规则:'utf8mb4_unicode_520_ci'”。

Usage Scenarios:

使用场景:

While the plugin will work in any WordPress install: local, staging or live, it is specially designed to work with DesktopServer.

尽管该插件可以在任何WordPress安装中运行:本地,临时或实时,但它是专门为与DesktopServer一起使用而设计的。

Its process will be triggered and change the collation types on all database tables during any DesktopServer Create Site, Copy Site, Move Site, Import and Export operations.

在任何DesktopServer创建站点,复制站点,移动站点,导入和导出操作期间,将触发其过程并更改所有数据库表上的排序规则类型。

This allows you to import and export sites in the most compatible ways during deployments.

这使您可以在部署期间以最兼容的方式导入和导出站点。

If you would like to use this with DesktopServer as a Design Time plugin, you can install this in your /xampplite/ds-plugins/ directory and it can then be automatically activated and used with all of your local development web sites.

如果要将它与DesktopServer一起用作设计时插件,可以将其安装在/ xampplite / ds-plugins /目录中,然后可以将其自动激活并与所有本地开发网站一起使用。

For more information on DesktopServer and local development tools, please visit our web site at: https://serverpress.com/get

有关DesktopServer和本地开发工具的更多信息,请访问我们的网站: https://serverpress.com/get

-desktopserver/.

-desktopserver / 。

Alternatively, you can install this as a regular WordPress plugin on any site.

或者,您可以将其作为常规WordPress插件安装在任何站点上。

Once activated, all of your database tables will be updated to use the more portable Collation Algorithm.

一旦激活,您的所有数据库表将被更新以使用更便于携带的归类算法。

If you are migrating your web site, you can install and activate the plugin then perform your database export.

如果要迁移网站,则可以安装并激活插件,然后执行数据库导出。

Once you have migrated your site, you can deactivate and remove the plugin as it would be no longer needed.

迁移网站后,您可以停用并删除该插件,因为不再需要它。

If you will be exporting and/or migrating your site repeatedly, such as when using it on a test or staging install, you can leave the plugin active indefinitely and it will continue to monitor and update your database tables automatically, allowing you to perform migrations

如果您要重复导出和/或迁移站点,例如在测试或分阶段安装中使用它,则可以无限期使该插件保持活动状态,并且它将继续自动监视和更新数据库表,从而使您可以执行迁移

at any time.

随时。

This is ideal in situations where you are installing or testing plugins that may create their own database tables, as these tables may be created with the newer Collation Algorithms that are not as portable.

在您正在安装或测试可以创建自己的数据库表的插件的情况下,这是理想的选择,因为这些表可能是使用不那么可移植的较新的归类算法创建的。

How it Works:

工作方式:

The Database Collation Fix tool converts database tables using ‘utf8mb4_unicode_520_ci’ or ‘utf8_unicode_520_ci’ Collation Algorithms to a more portable ‘utf8mb4_unicode_ci’ collation on a once daily basis.

数据库归类修复工具每天一次使用utf8mb4_unicode_520_ci或utf8_unicode_520_ci归类算法将数据库表转换为更便于移植的utf8mb4_unicode_ci归类。

It also modifies any column-specific collation statements, not just the default table collation.

它还修改了任何特定于列的归类语句,而不仅仅是默认的表归类。

This means that you can install this plugin and it will continue to monitor all of your database tables and convert them to the more portable Collation Algorithm automatically.

这意味着您可以安装此插件,它将继续监视所有数据库表并将它们自动转换为更便于移植的归类算法。

This tool will convert your database tables and columns to use the ‘utf8mb4_unicode_ci’ collation algorithm.

此工具将转换您的数据库表和列,以使用“ utf8mb4_unicode_ci”排序规则算法。

This can be modified to any other collation algorithm you wish by updating your wp-config.php file and adding or changing the following setting:

可以通过更新 wp-config.php 文件并添加或更改以下设置来将其修改为所需的任何其他排序规则算法:

define('DB_COLLATE', 'utf8_general_ci');

define('DB_COLLATE','utf8_general_ci');

You can use ‘utf8_general_ci’ or ‘utf8’ or any other supported collation algorithm.

您可以使用“ utf8_general_ci”或“ utf8”或任何其他受支持的归类算法。

See https://dev.mysql.com/docefman/

参见 https://dev.mysql.com/docefman/

5.7/en/charset-mysql.html for a full description of MySQL's Character Set and Collation Algorithm selections.

5.7 / en / charset-mysql.html 详细介绍了MySQL的字符集和排序规则算法选择。

Support:

支持:

Support Details: We are happy to provide support and help troubleshoot issues.

支持详细信息::我们很高兴提供支持并帮助您解决问题。

Visit our Contact page at http://serverpress.com/contact/.

请访问 http://serverpress.com/contact/ 上的“联系”页面。

Users should know however, that we check the WordPress.org support forums once a week on Wednesdays from 6pm to 8pm PST (UTC -8).

用户应该知道,但是我们每周三在太平洋标准时间(UTC -8)下午6点至晚上8点检查WordPress.org支持论坛。

ServerPress, LLC is not responsible for any loss of data that may occur as a result of using this tool.

ServerPress,LLC对使用此工具可能导致的任何数据丢失概不负责。

We strongly recommend performing a site and database backup before testing and using this tool.

强烈建议在测试和使用此工具之前执行站点和数据库备份。

However, should you experience such an issue, we want to know about it right away.

但是,如果您遇到这样的问题,我们想立即知道。

We welcome feedback and Pull Requests for this plugin via our public GitHub repository located at: https://github.com

我们欢迎通过我们位于以下位置的公共GitHub存储库对该插件的反馈和请求请求: https://github.com

/ServerPress/databasecollationfix

/ ServerPress / databasecollat​​ionfix

安装步骤

Installation instructions: To install, do the following:

安装说明:要安装,请执行以下操作:

    1. From the dashboard of your site, navigate to Plugins –> Add New.
    2. 从网站的信息中心,导航至“插件”->“添加新内容”。

    3. Select the “Upload Plugin” button.
    4. 选择“上传插件”按钮。

    5. Click on the “Choose File” button to upload your file.
    6. 单击“选择文件”按钮以上传文件。

    7. When the Open dialog appears select the databasecollationfix.zip file from your desktop.
    8. 当出现“打开”对话框时,从桌面上选择databasecollat​​ionfix.zip文件。

    9. Follow the on-screen instructions and wait until the upload is complete.
    10. 按照屏幕上的说明进行操作,然后等待上传完成。

    11. When finished, activate the plugin via the prompt.

    12. 完成后,通过提示激活插件。

      A confirmation message will be displayed.

    13. 将显示一条确认消息。

    or, you can upload the files directly to your server.

    或者,您可以将文件直接上传到服务器。

      1. Upload all of the files in databasecollationfix.zip to your /wp-content/plugins/databasecollationfix directory.
      2. databasecollat​​ionfix.zip 中的所有文件上传到您的 / wp-content / plugins / databasecollat​​ionfix 目录中。

      3. Activate the plugin through the ‘Plugins’ menu in WordPress.
      4. 通过WordPress中的“插件”菜单激活插件。

下载地址
https://downloads.wordpress.org/plugin/database-collation-fix.zip
-EOF-

AI助手支持GPT4.0