User Permissions for MySQL

The MySQL user the Database Agent uses to monitor the MySQL database must have "SELECT", "PROCESS", and "SHOW DATABASES" privileges on all databases.

The user must also have the "REPLICATION CLIENT" privilege to collect these metrics:

  • Slave_io_running
  • Slave_sql_running
  • Seconds_behind_master
  • SQL_Delay

If you do not have a suitable existing user, you can use the command below to create a new user.

CODE
CREATE USER 'DBMon_Agent_User'@'host' identified by 'password';
GRANT SELECT,PROCESS,SHOW DATABASES on *.* to 'DBMon_Agent_User'@'host' identified by 'password';
GRANT REPLICATION CLIENT ON *.* to 'DBMon_Agent_User'@'host';
FLUSH privileges;
Note: Sensitive values saved in this collector before FIPS mode was enabled might use a legacy encryption scheme. After FIPS migration, edit the collector, re-enter every applicable password or secret shown in this section, and save the configuration. Do not interpret a blank password field as proof that no password is configured. For more information, see Database Monitoring FIPS Secret Migration.

Substitute DBMon_Agent_User with the username under which you run the Database Visibility Agent. Substitute host with the hostname or IP address of the machine running the Splunk AppDynamics Database Agent, and substitute password with a secure password.

Set the max_allowed_packet parameter to 1073741824 on the server.