User Account Requirements for MySQL Agent

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

  • PROCESS

  • EXECUTE

  • EVENT

  • SHOW VIEW

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

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.

×

Loading...