### 5.6.2 获取服务器插件信息

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

-   这[`INFORMATION_SCHEMA.PLUGINS`](information-schema-plugins-table.html)表为每个加载的插件包含一行。任何有`插件库`的价值`空值`是内置的，无法卸载。

    ```
    mysql> SELECT * FROM INFORMATION_SCHEMA.PLUGINS\G
    *************************** 1. row ***************************
               PLUGIN_NAME: binlog
            PLUGIN_VERSION: 1.0
             PLUGIN_STATUS: ACTIVE
               PLUGIN_TYPE: STORAGE ENGINE
       PLUGIN_TYPE_VERSION: 50158.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
    ...
    *************************** 10. row ***************************
               PLUGIN_NAME: InnoDB
            PLUGIN_VERSION: 1.0
             PLUGIN_STATUS: ACTIVE
               PLUGIN_TYPE: STORAGE ENGINE
       PLUGIN_TYPE_VERSION: 50158.0
            PLUGIN_LIBRARY: ha_innodb_plugin.so
    PLUGIN_LIBRARY_VERSION: 1.0
             PLUGIN_AUTHOR: Oracle Corporation
        PLUGIN_DESCRIPTION: Supports transactions, row-level locking,
                            and foreign keys
            PLUGIN_LICENSE: GPL
               LOAD_OPTION: ON
    ...
    ```

-   这[`显示插件`](show-plugins.html)语句为每个加载的插件显示一行。任何有`图书馆`的价值`空值`是内置的，无法卸载。

    ```
    mysql> SHOW PLUGINS\G
    *************************** 1. row ***************************
       Name: binlog
     Status: ACTIVE
       Type: STORAGE ENGINE
    Library: NULL
    License: GPL
    ...
    *************************** 10. row ***************************
       Name: InnoDB
     Status: ACTIVE
       Type: STORAGE ENGINE
    Library: ha_innodb_plugin.so
    License: GPL
    ...
    ```

-   这`mysql.plugin`表格显示了哪些插件已注册[`安装插件`](install-plugin.html).该表仅包含插件名称和库文件名，因此它提供的信息不如[`插件`](information-schema-plugins-table.html)表或[`显示插件`](show-plugins.html)陈述。
