MySQL Variables sha256_password_private_key_path 数据库 参数变量解释及正确配置使用
本站中文解释
sha256_password_private_key_path是MySQL中的一个参数,其作用是指定sha256_password plugin使用的私钥文件路径。
sha256_password plugin是MySQL 8.0版本新增的一个安全插件,它可以使用证书和SHA256哈希算法加密MySQL账户和密码,来提高MySQL的安全性。
要设置sha256_password_private_key_path参数,可以在MySQL配置文件中添加以下行:
sha256_password_private_key_path=/path/to/private_key_file.pem
官方英文解释
sha256_password_private_key_path
Command-Line Format | --sha256-password-private-key-path=file_name |
---|---|
System Variable | sha256_password_private_key_path |
Scope | Global |
Dynamic | No |
Type | File name |
Default Value | private_key.pem |
This variable is available if MySQL was compiled using OpenSSL
(see Section 6.3.4, “SSL Library-Dependent Capabilities”). Its value is the path
name of the RSA private key file for the
sha256_password
authentication plugin. If
the file is named as a relative path, it is interpreted
relative to the server data directory. The file must be in PEM
format.
Because this file stores a private key, its access mode
should be restricted so that only the MySQL server can read
it.
For information about sha256_password
, see
Section 6.4.1.5, “SHA-256 Pluggable Authentication”.