NetBackup™ for MySQL Administrator's Guide
Authenticating the MySQL environment password
Authenticating the MySQL environment password keeps you from specifying the password every time you run a backup. The my.cnf
or the my.ini
file stores the authentication credentials that the agent reads when it connects to the MySQL server. Make sure that you store the password in the MySQL environment variable.
The MySQL utility to encrypt the password lets you set, reset, and validate the password. The password encryption uses the port number to create a section name that corresponds to the instance to which the password belongs.
In MySQL v5.5.x, it reads the plain text authentication credentials from the MySQL configuration file my.cnf
. To authenticate, under the client section, edit the my.cnf
, or my.ini
file to add the password. For example:
[client]
port=3306
password= type the password
In MySQL v5.6 and later, it reads the encrypted authentication credentials from the MySQL options .mylogin.cnf
file.
To authenticate the password
- (Windows) Run the following command:
mysql_config_editor.exe set --port=<portnumber> --password
For example, if the portnumber is 3306:
mysql_config_editor.exe set --port=3306 --password
- (Linux) Run the following command:
mysql_config_editor set --port=<portnumber> --password
For example, if the portnumber is 3306:
mysql_config_editor set --port=3306 --password
- To reset the password, run the command that applies to your operating system:
(Windows) mysql_config_editor.exe reset
(Linux) mysql_config_editor reset
- To validate the password, run the command that applies to your operating system:
(Windows) mysql_config_editor.exe print --all
(Linux) mysql_config_editor print --all