Documentation Home
MySQL 8.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 294.0Kb
Man Pages (Zip) - 409.0Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.3 Reference Manual  /  ...  /  Obtaining Server Plugin Information

7.6.2 获取服务器插件信息

有多种方法可以确定服务器中安装了哪些插件:

  • 信息模式 PLUGINS 表包含每个加载的插件的一行。任何具有 PLUGIN_LIBRARY 值为 NULL 的插件都是内置的,无法卸载。

    mysql> TABLE INFORMATION_SCHEMA.PLUGINS\G
    *************************** 1. row ***************************
               PLUGIN_NAME: binlog
            PLUGIN_VERSION: 1.0
             PLUGIN_STATUS: ACTIVE
               PLUGIN_TYPE: STORAGE ENGINE
       PLUGIN_TYPE_VERSION: 80100.0
            PLUGIN_LIBRARY: NULL
    PLUGIN_LIBRARY_VERSION: NULL
             PLUGIN_AUTHOR: Oracle Corporation
        PLUGIN_DESCRIPTION: This is a pseudo storage engine to represent the binlog in a transaction
            PLUGIN_LICENSE: GPL
               LOAD_OPTION: FORCE
    *************************** 2. row ***************************
               PLUGIN_NAME: mysql_native_password
            PLUGIN_VERSION: 1.1
             PLUGIN_STATUS: ACTIVE
               PLUGIN_TYPE: AUTHENTICATION
       PLUGIN_TYPE_VERSION: 2.1
            PLUGIN_LIBRARY: NULL
    PLUGIN_LIBRARY_VERSION: NULL
             PLUGIN_AUTHOR: Oracle Corporation
        PLUGIN_DESCRIPTION: Native MySQL authentication
            PLUGIN_LICENSE: GPL
               LOAD_OPTION: FORCE
    ...
  • SHOW PLUGINS 语句显示每个加载的插件的一行。任何具有 Library 值为 NULL 的插件都是内置的,无法卸载。

    mysql> SHOW PLUGINS\G
    *************************** 1. row ***************************
       Name: binlog
     Status: ACTIVE
       Type: STORAGE ENGINE
    Library: NULL
    License: GPL
    *************************** 2. row ***************************
       Name: mysql_native_password
     Status: ACTIVE
       Type: AUTHENTICATION
    Library: NULL
    License: GPL
    ...
  • mysql.plugin 表显示了哪些插件已经使用 INSTALL PLUGIN 注册。该表仅包含插件名称和库文件名,因此它不提供与 PLUGINS 表或 SHOW PLUGINS 语句一样多的信息。