Configuring User Accounts for Backups of MySQL

The MySQL agent requires a MySQL Server user account that has sufficient privileges for the software to:

  • Perform backups and restores

  • Access the MySQL Server application

  • Stop or start the MySQL Server services

The following table illustrates the necessary privileges the user account should have to perform backup and restore operations:

Operations

Privileges MySQL User Should Have

Example Query to Grant the Permission

Backup

  • SHOW DATABASES

  • SUPER

  • RELOAD

  • SELECT

  • LOCK TABLES

  • EVENT

  1. mysql> GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD, SUPER ON *.* to '<backup_agent_user>'@'localhost' IDENTIFIED BY '<backup_agent_password>';
    mysql> GRANT SHOW DATABASES, SELECT, LOCK TABLES, RELOAD, SUPER ON *.* to '<backup_agent_user>'@'127.0.0.1' IDENTIFIED BY '<backup_agent_password>';
    mysql> FLUSH PRIVILEGES;

  2. It is recommended to grant all Database Administrator privileges to perform backup operations for some versions.

    Example: For MySQL 5.7 and later, you should grant all Database Administrator privileges to perform backup operations.

    mysql> GRANT ALL PRIVILEGES ON *.* TO '<backup_agent_user>'@'localhost' IDENTIFIED BY '<backup_agent_password>';
    mysql> GRANT ALL PRIVILEGES ON *.* TO '<backup_agent_user>'@'127.0.0.1' IDENTIFIED BY '<backup_agent_password>';
    mysql> FLUSH PRIVILEGES;

Restore

Full Database Administrator privileges

mysql> GRANT ALL PRIVILEGES ON *.* TO '<restore_agent_user>'@'localhost' IDENTIFIED BY '<restore_agent_password>';
mysql> GRANT ALL PRIVILEGES ON *.* TO <restore_agent_user>'@'127.0.0.1' IDENTIFIED BY '<restore_agent_password>';
mysql> FLUSH PRIVILEGES;

Initially, the user account credentials is provided during the instance configuration after the installation of the Agent. You can change the user account at the instance level.

  1. From the CommCell Browser, navigate to Client Computers > client > MySQL.

  2. Right-click the instance, and then click Properties.

    The Properties of MySql Server dialog box appears.

  3. To update the user account information, on the Accounts tab, complete one of the following steps:

    • For Windows,

      1. To enter the SA User Name, click Change. Enter the MySQL user name and password.

      2. To enter the NT UserName, click Change. Enter the Windows user name and password.

    • For Linux,

      1. To enter the SA User Name, click Change. Enter the MySQL user name and password.

      2. To enter the UNIX UserName, type the Linux user name.

  4. Click OK.

useraccount_instance - configurationklzzwxh:0000ysqlklzzwxh:0001seraccount_instance.png

×

Loading...