在安装mysql时,输入mysqld --initialize --console后,会生成一个随机密码(最后12位),请问该如何截取这12位密码并保存,后续调用?- D:\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin>mysqld --initialize --console
- 2022-04-19T11:45:10.951279Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
- 2022-04-19T11:45:10.951298Z 0 [System] [MY-013169] [Server] D:\mysql-8.0.28-winx64\mysql-8.0.28-winx64\bin\mysqld.exe (mysqld 8.0.28) initializing of server in progress as process 14012
- 2022-04-19T11:45:10.951379Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
- 2022-04-19T11:45:10.990057Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
- 2022-04-19T11:45:11.514595Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
- 2022-04-19T11:45:12.296844Z 0 [Warning] [MY-013829] [Server] Missing data directory for ICU regular expressions: D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\lib\private\.
- 2022-04-19T11:45:13.580235Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: C6lGXsJfk,4D
复制代码
|