#### 6.4.4.16 密钥环元数据

本节介绍有关密钥环使用的信息来源。

要查看是否加载了密钥环插件，请检查[`INFORMATION_SCHEMA.PLUGINS`](information-schema-plugins-table.html)表或使用[`显示插件`](show-plugins.html)声明（见[第 5.6.2 节，“获取服务器插件信息”](obtaining-plugin-information.html)）。例如：

```
mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS
       FROM INFORMATION_SCHEMA.PLUGINS
       WHERE PLUGIN_NAME LIKE 'keyring%';
+--------------+---------------+
| PLUGIN_NAME  | PLUGIN_STATUS |
+--------------+---------------+
| keyring_file | ACTIVE        |
+--------------+---------------+
```

要查看存在哪些键，请检查性能架构[`钥匙圈钥匙`](performance-schema-keyring-keys-table.html)桌子：

```
mysql> SELECT * FROM performance_schema.keyring_keys;
+-----------------------------+--------------+----------------+
| KEY_ID                      | KEY_OWNER    | BACKEND_KEY_ID |
+-----------------------------+--------------+----------------+
| audit_log-20210322T130749-1 |              |                |
| MyKey                       | me@localhost |                |
| YourKey                     | me@localhost |                |
+-----------------------------+--------------+----------------+
```

要查看是否加载了密钥环组件，请检查 Performance Schema[`keyring_component_status`](performance-schema-keyring-component-status-table.html)桌子。例如：

```
mysql> SELECT * FROM performance_schema.keyring_component_status;
+---------------------+-------------------------------------------------+
| STATUS_KEY          | STATUS_VALUE                                    |
+---------------------+-------------------------------------------------+
| Component_name      | component_keyring_file                          |
| Author              | Oracle Corporation                              |
| License             | GPL                                             |
| Implementation_name | component_keyring_file                          |
| Version             | 1.0                                             |
| Component_status    | Active                                          |
| Data_file           | /usr/local/mysql/keyring/component_keyring_file |
| Read_only           | No                                              |
+---------------------+-------------------------------------------------+
```

一种`组件状态`的价值`积极的`表示组件初始化成功。如果组件加载但未能初始化，则值为`已禁用`.
