MySQL 8.4 發行說明
本節說明有關金鑰環使用情況的資訊來源。
若要查看是否已載入金鑰環外掛程式,請檢查 Information Schema 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 |
+-------------+---------------+
若要查看存在哪些金鑰,請檢查 Performance Schema 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 | |
+-----------------------------+--------------+----------------+
若要查看是否已載入金鑰環元件,請檢查 Performance Schema 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
。