NetBackup™ for MySQL 管理指南
验证密码
通过验证密码,您就不必再每次运行备份时指定密码。my.cnf
或 my.ini
文件存储代理在连接到 MySQL 服务器时读取的身份验证凭据。确保将密码存储在 MySQL 环境变量中。
通过用于加密密码的 MySQL 实用程序,可以设置、重置和验证密码。密码加密使用端口号创建与密码所属实例对应的部分名称。
在 MySQL v5.5.x 中,它从 MySQL 配置文件 my.cnf
读取纯文本身份验证凭据。要进行身份验证,在“客户端”部分下,编辑 my.cnf
或 my.ini
文件以添加密码。例如:
[client]
port=3306
password= type the password
在 MySQL v5.6 及更高版本中,它从 MySQL 选项文件 .mylogin.cnf
读取加密的身份验证凭据。
验证密码
- (Windows) 运行以下命令:
mysql_config_editor.exe set --port=<portnumber> --password
例如,如果 portnumber 为 3306:
mysql_config_editor.exe set --port=3306 --password
- (Linux) 运行以下命令:
mysql_config_editor set --port=<portnumber> --password
例如,如果 portnumber 为 3306:
mysql_config_editor set --port=3306 --password
- 要重置密码,请运行适用于操作系统的命令:
(Windows) mysql_config_editor.exe reset
(Linux) mysql_config_editor reset
- 要验证密码,请运行适用于操作系统的命令:
(Windows) mysql_config_editor.exe print --all
(Linux) mysql_config_editor print --all