The MySQL Enterprise Agent requires a user configured within each MySQL
instance that is being monitored with suitable privileges to
collect information about the server, including variable names,
replication, and storage engine status information. The agent
installer creates a suitable user for you during installation if
you supply the installer with a user/password for a privileged
user (such as the
root user). This account
information is used only during the installation to create the
user, and is not written to any file. If you use this option, skip
the remainder of this section.
If you do not supply the root user information to the installer, create a user manually within your MySQL server and provide these credentials as the agent user/password combination during installation. The privileges required for this user account vary depending on the information you gather using the MySQL Enterprise Agent. The following privileges allow the Monitor Agent to perform its assigned duties without limitation:
SHOW DATABASES: The MySQL Enterprise Agent can
gather inventory about the monitored MySQL server.
REPLICATION CLIENT: The MySQL Enterprise Agent can
gather Replication master/slave status data. This privilege is
only needed if you use the MySQL Replication Advisor Rules.
SELECT: The MySQL Enterprise Agent can collect
statistics for table objects.
SUPER: The MySQL Enterprise Agent can execute
SHOW ENGINE INNODB STATUS to collect data
about InnoDB tables. This privilege is also required to obtain
replication information using
STATUS, and to temporarily switch off replication
when populating the
used to identify the MySQL instance.
PROCESS: When monitoring a MySQL server
running MySQL 5.1.24 or above with
PROCESS privilege is required to
SHOW ENGINE INNODB STATUS.
INSERT: Required to create the UUID
required by the agent.
CREATE: The MySQL Enterprise Agent can create
tables. During discovery, the agent creates the table
inventory within the
mysql database that stores the UUID for the
server. Without this table, the agent cannot determine the
UUID of the server, which it sends along with other
information to MySQL Enterprise Service Manager.
For example, the following
gives the agent the required
GRANT SELECT, REPLICATION CLIENT, SHOW DATABASES, SUPER, PROCESS ON *.* TO '
localhost' IDENTIFIED BY '
For security reasons, you might limit the
to the agent so that it can only create tables within the
GRANT CREATE, INSERT ON mysql.* TO '
localhost' IDENTIFIED BY '
To let replication discovery work, grant the
SELECT privilege on the
mysql.inventory table for each user with
replication privileges on the corresponding replication master.
This is required to let the MySQL Enterprise Agent read the replication
master UUID. For example:
GRANT SELECT ON mysql.inventory TO '
%' IDENTIFIED BY '
Perform this step after after running the
agent on the corresponding MySQL server to ensure that the
mysql.inventory table is created correctly.
Run the agent, shut the agent down, run the above
GRANT statement, and then restart the agent.
If the agent cannot access the information from the table, a warning containing this information is written to the agent log.
You might disable logging for the grant statement to prevent the
grant information being replicated to the slaves. In this case,
execute the statement
before executing the above
In a typical configuration, the agent runs on the same machine as
the MySQL server it is monitoring, so the host name is
localhost. If the agent is running on a
machine other than the one that hosts the monitored MySQL server,
localhost to the appropriate
value. For more information about remote monitoring, see
Section 5.3.7, “Configuring an Agent to Monitor a Remote MySQL Server”.