Windows环境MySQL 8.4 component_keyring_file初始化失败问题解决
Windows下MySQL 8.4 component_keyring_file初始化错误解决
错误现象
Component component_keyring_file reported: 'The component is not initialized properly'
关联配置文件信息
1. 组件专属配置文件
路径:
C:\Program Files\MySQL\MySQL Server 8.4\lib\plugin\component_keyring_file.cnf
原配置内容:
{"path": "\mysql\keyring", "read_only": false }
2. 服务主配置文件
路径:
C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.my
相关配置项:
{ "components": "file://component_keyring_file", "path": "/var/lib/mysql-keyring/component_keyring_file", "read_only": false }
疑问点
- 路径错误或Windows系统特有的路径问题?
- 密钥环文件组件的JSON配置错误?
- MySQL 8.4在Windows上的兼容性或Bug?
补充日志信息
- 2025-03-03T02:51:36.378648Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe: Shutdown complete (mysqld 8.4.4-commercial) MySQL Enterprise Server - Commercial.
- 2025-03-03T02:51:36.379602Z 0 [System] [MY-015016] [Server] MySQL Server - end.
- 2025-03-03T02:51:36.948687Z 0 [System] [MY-015015] [Server] MySQL Server - start.
- 2025-03-03T02:51:37.069695Z 0 [ERROR] [MY-013714] [Server] Component component_keyring_file reported: 'The component is not initialized properly. Error: Could not find 'path' value in configuration file. Make sure that configuration is proper and use ALTER INSTANCE RELOAD KEYRING to reinitialize the component.'
- 2025-03-03T02:51:37.075000Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe (mysqld 8.4.4-commercial) starting as process 22832
- 2025-03-03T02:51:37.103795Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
- 2025-03-03T02:51:37.382251Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
- 2025-03-03T02:51:37.675704Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
- 2025-03-03T02:51:37.676464Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
- 2025-03-03T02:51:37.717141Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
- 2025-03-03T02:51:37.717238Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe: ready for connections. Version: '8.4.4-commercial' socket: '' port: 3306 MySQL Enterprise Server - Commercial.
性能_schema查询结果
执行语句:
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 | Disabled |
| Data_file | |
| Read_only |
解决方案
修改组件专属配置文件:
C:\Program Files\MySQL\MySQL Server 8.4\lib\plugin\component_keyring_file.cnf
正确配置内容:
{"path": "C:\\Program Files\\MySQL\\MySQL Server 8.4\\keyring", "read_only": false }
注意事项:
- 确保
C:\Program Files\MySQL\MySQL Server 8.4\keyring是文件而非文件夹 - 确保MySQL服务账号拥有该文件的读写权限
内容的提问来源于stack exchange,提问作者neutrino kusrorong
相关产品推荐
相关产品推荐

