文档首页
MySQL 9.0 参考手册
相关文档 下载本手册
PDF(美国 Letter) - 40.0 MB
PDF(A4) - 40.1 MB
手册页(TGZ) - 258.2 KB
手册页(Zip) - 365.3 KB
信息(Gzip) - 4.0 MB
信息(Zip) - 4.0 MB


MySQL 9.0 参考手册  /  ...  /  密钥环元数据

8.4.4.14 密钥环元数据

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

要查看是否加载了密钥环插件,请检查信息架构 PLUGINS 表或使用 SHOW PLUGINS 语句(请参见 第 7.6.2 节“获取服务器插件信息”)。例如

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

要查看存在哪些密钥,请检查性能架构 keyring_keys

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

要查看是否加载了密钥环组件,请检查性能架构 keyring_component_status 表。例如

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                                              |
+---------------------+-------------------------------------------------+

Component_status 值为 Active 表示组件已成功初始化。如果组件已加载但初始化失败,则该值为 Disabled